CloudSinkInterface Property

General info

Label

Interface

Description

Compound to define the interface

Data type

UInt32

Default value

1 (inmation.model.codes.CloudSinkInterface.CS_KAFKAPRODUCER)

Type

CodingGroup

Code

6733

Symbolic name

MODEL_PROP_CLOUDSINKINTERFACE

Lua access code

inmation.model.properties.CloudSinkInterface

Parent properties

CloudSinkParameter

Attributes

Name Tooltip
PROP_CONFIGURABLE The property is configurable and can be changed with DataStudio and the various inmation APIs
PROP_VISIBLE The property is visible in DataStudio and can be read by the inmation APIs
PROP_HAS_DEFAULT The property has a default value as standard

Codings

Coding group: CloudSinkInterface

Name Code Label Tooltip

CS_KAFKAPRODUCER

1

Kafka Producer

The Apache Kafka stream-processing software platform is used as a sink target

CS_MQTTPUBLISHER

2

MQTT Publisher

The MQQT (Message Queuing Telemetry Transport) publish-subscribe-based messaging protocol is used as a sink target

Examples

Read from or write to the CloudSinkInterface property.

  • Lua

  • C#

-- Read from the CloudSinkInterface
inmation.getvalue("<OBJECT FULL PATH>.CloudSinkInterface")

-- Write to the CloudSinkInterface
inmation.setvalue("<OBJECT FULL PATH>.CloudSinkInterface",
    inmation.model.codes.CloudSinkInterface.CS_KAFKAPRODUCER)
TcpConfig tcpcfg = new TcpConfig() { HostNameOrIp = "localhost", Port = 6512 };
SecurityCredentials sc = new SecurityCredentials() { ProfileName = "so", Password = "inmation" };
StatelessInterface sli = new StatelessInterface(tcpcfg);

// Read from the CloudSinkInterface
Result result = sli.ReadValue(sc, new ReadItem("<OBJECT FULL PATH>.CloudSinkInterface"));
// Write to the CloudSinkInterface
Result result = sli.WriteValue(sc, new WriteItem(CloudSinkInterface.CS_KAFKAPRODUCER, "<OBJECT FULL PATH>.CloudSinkInterface"));

A switch-like function of the codings.

function get_coding_name(code)
    local csi = inmation.model.codes.CloudSinkInterface
    if csi.CS_KAFKAPRODUCER==code then return 'CS_KAFKAPRODUCER'
    elseif csi.CS_MQTTPUBLISHER==code then return 'CS_MQTTPUBLISHER'
    end
end
return get_coding_name(inmation.model.codes.CloudSinkInterface.CS_KAFKAPRODUCER)