inmationComponentCode Property

General info

Label

Component Type

Description

The internal type of a component (=service)

Data type

UInt32

Type

CodingGroup

Code

441

Symbolic name

MODEL_PROP_INMATIONCOMPONENTCODE

Lua access code

inmation.model.properties.inmationComponentCode

Available since

1.6.0.999

Parent properties

inmationComponent

Attributes

Name Tooltip
PROP_VISIBLE The property is visible in DataStudio and can be read by the inmation APIs

Codings

Coding group: SysComponents

Name Code Label Tooltip

Connector

1

Connector Service Component

Connector Service Component

Relay

2

Relay Service Component

Relay Service Component

Core

3

Core Service Component

Core Service Component

Cache

4

Cache Service Component

Cache Service Component

Broker

5

Broker Service Component

Broker Service Component

Server

6

Server Service Component

Server Service Component

Examples

Read from or write to the inmationComponentCode property.

  • Lua

  • C#

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

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

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

A switch-like function of the codings.

function get_coding_name(code)
    local sc = inmation.model.codes.SysComponents
    if sc.Connector==code then return 'Connector'
    elseif sc.Relay==code then return 'Relay'
    elseif sc.Core==code then return 'Core'
    elseif sc.Cache==code then return 'Cache'
    elseif sc.Broker==code then return 'Broker'
    elseif sc.Server==code then return 'Server'
    end
end
return get_coding_name(inmation.model.codes.SysComponents.Connector)