ICommand

[ Interface ]

Version 1.8

export interface ICommand {
    symbol: string;
    customerData?: string;
    readValue?: any;
    writeValue?: any;
    error?: TcHmi.IErrorDetails;
    commandOptions?: TcHmi.Server.ICommandOptions[];
};

Version 1.12

export interface ICommand<W = any, R = W> {
    symbol: string;
    customerData?: string;
    readValue?: R;
    writeValue?: W;
    error?: TcHmi.IErrorDetails;
    commandOptions?: TcHmi.Server.ICommandOptions[];
    processedStart?: string;
    processedEnd?: string; filter?: Filter | string;
    filterMap?: number[];
    orderBy?: string;
    limit?: number;
    offset?: number;
    maxEntries?: number;
};

If the API is used in TypeScript code, the TypeScript compiler can be notified of the server symbol type. First the type of the value is specified when writing (Write) and then optionally the type of the value to be read (Read).

Properties

Name

Type

Description

symbol

string

Symbol to be edited

customerData [ optional ]

string

Additional information that is applied from the query to the response

readValue [ optional ]

any

Value that was read

writeValue [ optional ]

any

Value to be written

error [ optional ]

TcHmi.IErrorDetails

Error code of the command

commandOptions [ optional ]

TcHmi.Server.ICommandOptions[]

Command parameters

processedStart [ Optional ]
Supported from version 1.12

string

The time (as ISO 8601 string) at which the command started to be processed on the server side.

processedEnd [ Optional ]: Supported from version 1.12

string

The time (as ISO 8601 string) at which command processing was complete on the server side.

filter [ Optional ]
Supported from version 1.12

Filter, string

Filter for arrays and map objects.

filterMap [ Optional ]
Supported from version 1.12

number[]

Allows filtered, sorted and paginated values to be assigned to the original values

orderBy [ Optional ]
Supported from version 1.12

string

Specifies the sorting order. This is processed before the values are potentially reduced via limit and offset.

limit [ Optional ]
Supported from version 1.12

number

Reduces the number of results that are returned in an array. The number 0 disables this feature.

offset [ Optional ]
Supported from version 1.12

number

Starts the results that are returned in an array with an offset. Counting starts at 0.

maxEntries [ Optional ]: Supported from version 1.12

number

The response contains the number of total values.

ICommand 1:

Available from 1.8

ICommand 2:

From version 1.10.1018.48 the property "error" is of type "TcHmi.IErrorDetails" instead of "TcHmi.Server.ICommandError".