-
Notifications
You must be signed in to change notification settings - Fork 2
secs
abinition edited this page Oct 1, 2014
·
2 revisions
HS supports SECS1 over serial and TCP terminal server connections, as well as HSMS over TCP.
Examples
handle COM = secs_open ( "COM7:" , 9600) ;
int SECS_ID = 1 ;
secs_assign ( SECS_ID, COM, 1 ) ;
handle COM = secs_open ( "COM1:" , 19200) ;
int SECS_ID = 1 ;
secs_assign ( SECS_ID, COM ) ;
handle COM = secs_open ( "192.168.11.99", 3001 ) ;
int SECS_ID = 1 ;
secs_assign ( SECS_ID, COM, 1 ) ;
handle COM = secs_service ( 3001 ) ;
int SECS_ID = 1 ;
secs_assign ( SECS_ID, COM ) ;
handle COM = secs_open ( "192.168.11.10", 5000 ) ;
int SECS_ID = 1 ;
secs_assign ( SECS_ID, COM, 1 ) ;
handle COM = secs_hsms ( 5000 ) ;
int SECS_ID = 1 ;
secs_assign ( SECS_ID, COM, 1 ) ;
Example:
SECS_S1F13() {
describe S1F13 ;
list S1F14 = {
char MDLN = "hyperscript",
char REV = version()
} ;
global S1F14 ;
} ;
secs_enable ( SECS_S1F13, 1,1,13 ) ;
SECS_S6F3() {
describe S6F3 ;
binary S6F4 = 0 ;
global S6F4 ;
} ;
secs_enable ( SECS_S6F11, 1,6,11 ) ;
Example:
list S1F13 = {
binary go = 1,
list x = {
char mdln = "Host",
char ver = "0.9"
}
} ;
timeout 30 ;
ret = secs_query ( SECS_ID, 1, 13, S1F13 ) ;
if ( !ret ) puts ret ;
if ( exists ( S1F14 ) ) describe S1F14 ;
list S6F3 = {
ushort DATAID = 1,
ushort CEID = 99,
list data = {
binary data = {0,1,2,3,4,5,6,7,8,9}
}
} ;
describe S6F3 ;
ret = secs_event ( SECS_ID, 6, 3, S6F3 ) ;