Skip to content

_secs_query

bergsma edited this page Sep 26, 2014 · 5 revisions

#secs_query

###Send a primary SECS II message query and wait for a reply.

Syntax

status = secs_query ( id,stream,function,data ) ;

Arguments

  1. int id

The SECS device Id. The SECS device id must be secs_assign()ed to a port handle created by secs_open() or secs_service() or secs_hsms().

  1. int stream

The SECS II stream value.

  1. int function

The SECS II function value.

  1. list data

The SECS II data to send.

Return Value

str status
  • $ACKNOWLEDGE : The SECS message was sent and a reply SECS message received.

The STATUS variable is set to $ACKNOWLEDGE

  • 0 : Device Id is out of range.

The STATUS variable is set to %BOUNDS

  • 0 : Device id 'x' is not assigned. Use secs_assign(id,fd)

The STATUS variable is set to %SECS

  • 0 : Cannot query with non-primary function

The STATUS variable is set to %SECS

  • 0 : No SECS connection (through port 'x') exists for device 'y'

The STATUS variable is set to %SECS

  • 0 : Failed to send SECS message

The STATUS variable is set to %SECS

Warnings

  • %BOUNDS : Device Id is out of range.
  • %SECS : Device id 'x' is not assigned. Use secs_assign(id,fd)
  • %SECS : Cannot query with non-primary function
  • %SECS : No SECS connection (through port 'x') exists for device 'y'
  • %SECS : Failed to send SECS message

Exceptions

  • %ARGUMENT: Invalid arguments. Usage: status = secs_query ( id,stream,function,data ) ;

  • %TIMEOUT: A timeout occurred before the reply message was received.

Description

  • None

Examples

puts "Create an example for the function 'secs_query'" ;

Related Links

secs_event
timeout

Clone this wiki locally