-
Notifications
You must be signed in to change notification settings - Fork 2
_secs_assign
#secs_assign
###Assign a SECS II device id to a tcp or serial port.
Syntax
status = secs_assign ( id,port[ ,r-bit ] ) ;
Arguments
- int id
SECS II device id. Valid range from 0 to 65535.
- handle port
A port handle returned by the secs_open, secs_hsms, or secs_service functions.
- boolean r-bit(optional)
Determines the value of the SECS I R-bit when sending messages to this device id.
If TRUE (R-bit is set), then the destination is a host, up the connection tree.
If FALSE (R-bit is clear), then the destination is an equipment, down the connection tree.
The default value is FALSE.
Return Value
str status
- $ACKNOWLEDGE : The device id was assigned to the port handle.
The STATUS variable is set to $ACKNOWLEDGE
- 0 : No secs port 'x'. Use secs_open to open port.
The STATUS variable is set to %UNDEFINED
- 0 : Device Id 'x' is already assigned to port 'y' by instance 'z'.
The STATUS variable is set to %SECS
Warnings
- %UNDEFINED : No secs port 'x'. Use secs_open to open port.
- %SECS : Device Id 'x' is already assigned to port 'y' by instance 'z'.
Exceptions
-
%ARGUMENT: Invalid arguments. Usage: status = secs_assign ( id,port[ ,r-bit ] ) ;
-
%BOUNDS: Device ID out of range.
Description
p
Examples
puts "Create an example for the function 'secs_assign'" ;
Related Links