1.1.2.4 Library Interface
G3 MAC Real Time driver library provides the following interfaces:
Functions
Name | Description |
---|---|
DRV_G3_MACRT_Initialize | Initializes the MAC RT instance for the specified driver index |
DRV_G3_MACRT_Open | Opens the specified MAC RT driver instance and returns a handle to it |
DRV_G3_MACRT_Close | Closes an opened instance of the MAC RT driver given its handle |
DRV_G3_MACRT_TxRequest | Allows a client to transmit MAC RT data through Power Line |
DRV_G3_MACRT_PIBGet | Allows a client to get information from PLC transceiver about MAC RT and PHY information base (PIB) |
DRV_G3_MACRT_PIBSet | Allows a client to set information to PLC transceiver on MAC RT and PHY information base (PIB) |
DRV_G3_MACRT_GetTimerReference | Get the internal timer reference from PLC transceiver in microseconds |
DRV_G3_MACRT_TxCfmCallbackRegister | Allows a client to set a data confirm event handling function for the driver to call back when the requested transmission has finished |
DRV_G3_MACRT_DataIndCallbackRegister | Allows a client to set a data indication event handling function for the driver to call back when a data reception has finished |
DRV_G3_MACRT_RxParamsIndCallbackRegister | Allows a client to set a reception parameters event handling function for the driver to call back when a new data message is received |
DRV_G3_MACRT_MacSnifferCallbackRegister | Allows enabling G3 MAC RT Sniffer capabilities and set the data buffer in which the content of the sniffer packet will be stored when a new PLC message is received |
DRV_G3_MACRT_CommStatusCallbackRegister | Allows a client to set a Comm Status indication event handling function for the driver to call back when a Comm Status event has to be reported |
DRV_G3_MACRT_PhySnifferCallbackRegister | Allows enabling G3 PHY Sniffer capabilities and set the data buffer in which the content of the sniffer packet will be stored when a new PLC message is received |
DRV_G3_MACRT_ExceptionCallbackRegister | Allows a client to set an exception event handling function for the driver to call back when some error occurs through PLC transceiver communication |
DRV_G3_MACRT_ExternalInterruptHandler | Allows application to register callback for PLC Interrupt pin |
DRV_G3_MACRT_Status | Gets the current status of the PLC driver module |
DRV_G3_MACRT_Tasks | Maintains the driver's state machine |
DRV_G3_MACRT_SleepIndCallbackRegister | Allows a client to set an sleep mode disable event handling function for the driver to call back when the PLC driver is active again |
DRV_G3_MACRT_Sleep | PLC driver Sleep mode management |
DRV_G3_MACRT_EnableTX | Enables/Disables PLC transmission |
Data types and constants
Name | Type | Description |
---|---|---|
DRV_G3_MACRT_EXCEPTION | Enum | Defines the type for G3 MAC RT Driver transfer errors |
DRV_G3_MACRT_TX_CFM_CALLBACK | Typedef | Pointer to a MAC RT Driver Transmission Confirm Event handler function |
DRV_G3_MACRT_DATA_IND_CALLBACK | Typedef | Pointer to a G3 MAC RT Driver Reception Event handler function |
DRV_G3_MACRT_RX_PARAMS_IND_CALLBACK | Typedef | Pointer to a G3 MAC RT Driver Event handler function to get parameters from the last received message |
DRV_G3_MACRT_MAC_SNIFFER_IND_CALLBACK | Typedef | Pointer to a G3 MAC RT Sniffer Reception Event handler function |
DRV_G3_MACRT_COMM_STATUS_IND_CALLBACK | Typedef | Pointer to a G3 MAC RT Communication Status Event handler function |
DRV_G3_MACRT_PHY_SNIFFER_IND_CALLBACK | Typedef | Pointer to a G3 MAC RT PHY Sniffer Reception Event handler function |
DRV_G3_MACRT_EXCEPTION_CALLBACK | Typedef | Pointer to a G3 MAC RT Driver Exceptions Event handler function |
DRV_G3_MACRT_SLEEP_IND_CALLBACK | Typedef | Notifies when Sleep Mode is disabled and MAC RT driver is available to be used again |
MAC_RT_TX_CFM_OBJ | Struct | Includes a transmission result and timestamp |
MAC_RT_RX_PARAMETERS_OBJ | Struct | Includes information to describe any new received message |
MAC_RT_STATUS | Enum | List of possible retun values for G3 MAC RT Driver functions |
MAC_RT_PIB_OBJ | Struct | Object to access the MAC RT and PHY Information Base |
MAC_RT_PIB | Enum | List of available MAC RT Information Base objects |
MAC_RT_PHY_PIB | Enum | List of available PHY Information Base objects |
DRV_G3_MACRT_INIT | Struct | Contains the data required to initialize the PLC driver |
DRV_PLC_HAL_INTERFACE | Struct | Contains the data required to initialize the PLC driver HAL Interface |
DRV_PLC_PLIB_INTERFACE | Struct | Contains the data required to initialize the PLC driver PLIB Interface |