Application Programming Interface
LayGO protocol services are accessed through
the LayGO Application Programming Interface (API). The API
abstracts features common to most communication protocols and
provides a uniform interface to them. The 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 API does not implement a transport
layer protocol, but it is similar in concept. It is intended to
provide a uniform interface to multiple underlying protocols while
still allowing access to protocol-specific features.
To achieve this abstraction, core API functions have been defined
which represent a generic communication model applicable to all
underlying protocols. These core functions are listed below by
category. For a detaileddescription of each function, see the
LayGO API Manual.
Supervisory functions to control the stack:
- lgo_ConfigureStack()
- lgo_SetDefaultConfiguration()
- lgo_InitializeStack()
- lgo_UnitializeStack()
- lgo_EnableStack()
- lgo_DisableStack()
- lgo_ActivateStack()
- lgo_InitializeServiceDatabase()
- lgo_UninitializeServiceDatabase()
- lgo_ValidateUserId()
Functions to support intelligent cards:
- lgo_GetHardwareId
- lgo_InitializeHardware
- lgo_CheckHardwareInitialization
- lgo_DownloadDriverModule
- lgo_CheckDriverModuleInitialization
Functions to support the RPC stack server:
- lgo_ConnectServer()
- lgo_ConnectServerIp()
- lgo_ConnectServerLocal()
- lgo_DisconnectServer()
- lgo_HeartbeatServer()
- lgo_ShutdownServer()
- log_RpcAttach()
- log_RpcAttachProtocol()
- lgo_RpcConnectServer()
- lgo_RpcConnectServerIp()
- lgo_RpcConnectServerLocal()
- lgo_RpcDisconnectServer()
- log_RpcGetHardwareId()
- log_RpcGetMaximumBufferSize()
- lgo_RpcHeartbeatServer()
- log_RpcOpen()
- log_RpcOpenProtocol()
- log_RpcValidateUserId()
Functions to manage protocol services:
- lgo_Open()
- lgo_OpenProtocol()
- lgo_Close()
- lgo_Reopen()
- lgo_Attach()
- lgo_AttachProtocol()
- lgo_Detach()
- lgo_LoadConfiguration()
- lgo_SaveConfiguration()
- lgo_SetConfiguration()
- lgo_GetConfiguration()
- lgo_Push()
- lgo_Pop()
Functions to connect and disconnect devices:
- lgo_ConnectRequest()
- lgo_ConnectAccept()
- lgo_ConnectReject()
- lgo_Listen()
- lgo_ListenCancel()
- lgo_DisconnectRequest()
- lgo_DisconnectConfirm()
Functions to read and write data and detect events:
- lgo_Read()
- lgo_Write()
- lgo_Xoff()
- lgo_Xon()
- lgo_ReadSpecial()
- lgo_WriteSpecial()
- lgo_ReadNext()
- lgo_ResetRequest()
- lgo_DiscardData()
- lgo_Event()
- lgo_Poll()
- lgo_Ioctl()
Functions to request information:
- lgo_GetStatistics()
- lgo_ClearStatistics()
- lgo_GetStatus()
- lgo_MaxBufferSize()
- lgo_State()
- lgo_Protocol()
Auxiliary functions to interpret return codes:
- lgo_ErrorMessage()
- lgo_EventMessage()
- lgo_ProtocolMessage()
- lgo_StateMessage()
- lgo_StatisticMessages()