Google Custom Search     

LayGO® API

LayGO® protocol services are accessed and controlled through the LayGO® Application Program Interface. The LayGO® API abstracts features common to most communication protocols and provides a uniform interface to them. The LayGO® API also allows access to protocol-specific features (via ioctl functions). However, if protocol-specific features are not required, applications using LayGO® can run unchanged with different combinations of protocols, as the situation warrants.

The LayGO® API is a set of functions and data types similar to those provided by the C Standard Library to access file system services or by UNIX to access sockets. The LayGO® API does not implement a transport layer protocol, but it is similar in concept.

The LayGO® API is intended to provide a uniform interface to multiple underlying protocols while still allowing access to protocol-specific features. To achieve this abstraction, core LayGO® API functions have been defined which represent a generic communication model applicable to all underlying protocols. These core functions are listed below. You can also check the LayGO® Device Library, to see how can you automate your work when using the LayGO® devices.

If you want detailed information about the LayGO® API, the whole LayGO® documentation set is available for download.




Stack Initialization
ActivateStackGive control to the protocol stack for processing.
ConfigureStackLoad a default stack configuration from file.
SetDefaultConfigurationSet the default configuration for a protocol.
DisableStackTemporarily prevent the protocol stack from processing.
EnableStackEnable processing of the protocol stack.
InitializeServiceDatabaseSet the database of service definitions.
InitializeStackPrepare the protocol stack and communications hardware for processing.
UninitializeServiceDatabaseUnset the database of service definitions.
UninitializeStackHalt the communications hardware and free resources used by the protocol stack.
ValidateUserIdValidate a user identifier.

Go to top

Intelligent Card Support
GetHardwareIdRetrieve the hardware identifier of a given driver.
InitializeHardwareInitiates a hardware reset of an intelligent board.
CheckHardwareInitializationCheck the success of a hardware reset of an intelligent board.
DownloadDriverModuleInitiate downloading of driver module into an intelligent board.
CheckDriverModuleInitializationCheck the success of driver module initialization after downloading to an intelligent board.

Go to top

RPC Server Support
ConnectServerEstablish a connection to the LayGO® RPC Server based on server identifier.
ConnectServerIpEstablish a connection to the LayGO® RPC Server based on the server's IP address.
ConnectServerLocalEstablish a connection to the LayGO® RPC Server on the local host.
DisconnectServerTerminate a connection to the LayGO® RPC Server.
HearbeatServerCalled periodically by the client to maintain the connection to the server.
ShutdownServerShutdown the LayGO® RPC Server.

Go to top

Managing Protocol Services
OpenReserve system resources for a communication service.
OpenProtocolReserve system resources for a communication service.
ReopenUnconditionally terminate a communication session.
CloseRelease system resources reserved for a communication service.
AttachAttach to a communication service.
AttachProtocolAttach to a communication service.
DetachDetach from an open communication service without closing.
LoadConfigurationLoad configuration data for a protocol from file.
SaveConfigurationSave a protocol configuration to file.
GetConfigurationRetrieve the configuration data for a connection.
SetConfigurationSet the configuration data for a connection.
PushStack one protocol service on top of another.
PopRemove the top protocol service from a stack of services.

Go to top

Making Connections
ConnectRequestInitiate a request to establish a communication session with a remote system.
ConnectAcceptAccept a connection request from a remote system.
ConnectRejectReject a connection request from a remote system.
ListenListen for a connection request from a remote system.
ListenCancelCancel a listen request.
DisconnectRequestInitiate termination of a communication session established with a remote system.
DisconnectConfirmConfirm termination of a communication session initiated by a remote system.

Go to top

Transferring Data
ReadRead data from a connection.
ReadNextRead next available data on any CID or report nondata event on a CID.
ReadSpecialRead specially tagged data from a connection.
WriteWrite data on a connection.
WriteSpecialWrite specially tagged data on a connection.
DiscardDataDiscard a waiting data packet.
EventRead a waiting control event.
PollPoll for the presence of control or data events.
IoctlPerform a protocol-specific function on a connection.
XoffRequest temporary suspension of data transmission by the remote system.
XonRequest resumption of data transmission by a remote system.
ResetRequestInitiate a reset procedure on a connection.

Go to top

Requesting Information
ClearStatisticsClear the statistics table on a connection.
GetStatisticsRetrieve the statistics table for a connection.
GetStatusRetrieve a status report for a connection.
MaxBufferSizeDetermine the maximum data buffer size which can be written on a connection.
ProtocolDetermine the protocol used on a connection.
StateDetermine the state of a connection.

Go to top

Interpreting Return Codes
ErrorMessageRetrieve a human-readable string describing an error.
EventMessageRetrieve a human-readable string describing an event.
ProtocolMessageRetrieve a human-readable string describing the protocol.
StateMessageRetrieve a human-readable string describing a state.
StatisticMessagesRetrieve a set of human-readable strings describing the statistics kept by a protocol.

Go to top