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 | Symbol to be edited | |
customerData [ optional ] | Additional information that is applied from the query to the response | |
readValue [ optional ] | Value that was read | |
writeValue [ optional ] | Value to be written | |
error [ optional ] | Error code of the command | |
commandOptions [ optional ] | Command parameters | |
processedStart [ Optional ] | 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 | The time (as ISO 8601 string) at which command processing was complete on the server side. | |
filter [ Optional ] | Filter, string | Filter for arrays and map objects. |
filterMap [ Optional ] | number[] | Allows filtered, sorted and paginated values to be assigned to the original values |
orderBy [ Optional ] | Specifies the sorting order. This is processed before the values are potentially reduced via | |
limit [ Optional ] | Reduces the number of results that are returned in an array. The number 0 disables this feature. | |
offset [ Optional ] | Starts the results that are returned in an array with an offset. Counting starts at 0. | |
maxEntries [ Optional ]: Supported from version 1.12 | The response contains the number of total values. |
Available from 1.8 |
From version 1.10.1018.48 the property "error" is of type "TcHmi.IErrorDetails" instead of "TcHmi.Server.ICommandError". |