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 |
| ActivateStack | Give control to the protocol stack for processing. |
| ConfigureStack | Load a default stack configuration from file. |
| SetDefaultConfiguration | Set the default configuration for a protocol. |
| DisableStack | Temporarily prevent the protocol stack from processing. |
| EnableStack | Enable processing of the protocol stack. |
| InitializeServiceDatabase | Set the database of service definitions. |
| InitializeStack | Prepare the protocol stack and communications hardware for processing. |
| UninitializeServiceDatabase | Unset the database of service definitions. |
| UninitializeStack | Halt the communications hardware and free resources used by the protocol stack. |
| ValidateUserId | Validate a user identifier. |
Go to top
| Intelligent Card Support |
| GetHardwareId | Retrieve the hardware identifier of a given driver. |
| InitializeHardware | Initiates a hardware reset of an intelligent board. |
| CheckHardwareInitialization | Check the success of a hardware reset of an intelligent board. |
| DownloadDriverModule | Initiate downloading of driver module into an intelligent board. |
| CheckDriverModuleInitialization | Check the success of driver module initialization after downloading to an intelligent board. |
Go to top
| RPC Server Support |
| ConnectServer | Establish a connection to the LayGO® RPC Server based on server identifier. |
| ConnectServerIp | Establish a connection to the LayGO® RPC Server based on the server's IP address. |
| ConnectServerLocal | Establish a connection to the LayGO® RPC Server on the local host. |
| DisconnectServer | Terminate a connection to the LayGO® RPC Server. |
| HearbeatServer | Called periodically by the client to maintain the connection to the server. |
| ShutdownServer | Shutdown the LayGO® RPC Server. |
Go to top
| Managing Protocol Services |
| Open | Reserve system resources for a communication service. |
| OpenProtocol | Reserve system resources for a communication service. |
| Reopen | Unconditionally terminate a communication session. |
| Close | Release system resources reserved for a communication service. |
| Attach | Attach to a communication service. |
| AttachProtocol | Attach to a communication service. |
| Detach | Detach from an open communication service without closing. |
| LoadConfiguration | Load configuration data for a protocol from file. |
| SaveConfiguration | Save a protocol configuration to file. |
| GetConfiguration | Retrieve the configuration data for a connection. |
| SetConfiguration | Set the configuration data for a connection. |
| Push | Stack one protocol service on top of another. |
| Pop | Remove the top protocol service from a stack of services. |
Go to top
| Making Connections |
| ConnectRequest | Initiate a request to establish a communication session with a remote system. |
| ConnectAccept | Accept a connection request from a remote system. |
| ConnectReject | Reject a connection request from a remote system. |
| Listen | Listen for a connection request from a remote system. |
| ListenCancel | Cancel a listen request. |
| DisconnectRequest | Initiate termination of a communication session established with a remote system. |
| DisconnectConfirm | Confirm termination of a communication session initiated by a remote system. |
Go to top
| Transferring Data |
| Read | Read data from a connection. |
| ReadNext | Read next available data on any CID or report nondata event on a CID. |
| ReadSpecial | Read specially tagged data from a connection. |
| Write | Write data on a connection. |
| WriteSpecial | Write specially tagged data on a connection. |
| DiscardData | Discard a waiting data packet. |
| Event | Read a waiting control event. |
| Poll | Poll for the presence of control or data events. |
| Ioctl | Perform a protocol-specific function on a connection. |
| Xoff | Request temporary suspension of data transmission by the remote system. |
| Xon | Request resumption of data transmission by a remote system. |
| ResetRequest | Initiate a reset procedure on a connection. |
Go to top
| Requesting Information |
| ClearStatistics | Clear the statistics table on a connection. |
| GetStatistics | Retrieve the statistics table for a connection. |
| GetStatus | Retrieve a status report for a connection. |
| MaxBufferSize | Determine the maximum data buffer size which can be written on a connection. |
| Protocol | Determine the protocol used on a connection. |
| State | Determine the state of a connection. |
Go to top
| Interpreting Return Codes |
| ErrorMessage | Retrieve a human-readable string describing an error. |
| EventMessage | Retrieve a human-readable string describing an event. |
| ProtocolMessage | Retrieve a human-readable string describing the protocol. |
| StateMessage | Retrieve a human-readable string describing a state. |
| StatisticMessages | Retrieve a set of human-readable strings describing the statistics kept by a protocol. |
Go to top