1.1.2.4 Library Interface

G3 MAC Real Time driver library provides the following interfaces:

Functions

NameDescription
DRV_G3_MACRT_InitializeInitializes the MAC RT instance for the specified driver index
DRV_G3_MACRT_OpenOpens the specified MAC RT driver instance and returns a handle to it
DRV_G3_MACRT_CloseCloses an opened instance of the MAC RT driver given its handle
DRV_G3_MACRT_TxRequestAllows a client to transmit MAC RT data through Power Line
DRV_G3_MACRT_PIBGetAllows a client to get information from PLC transceiver about MAC RT and PHY information base (PIB)
DRV_G3_MACRT_PIBSetAllows a client to set information to PLC transceiver on MAC RT and PHY information base (PIB)
DRV_G3_MACRT_GetTimerReferenceGet the internal timer reference from PLC transceiver in microseconds
DRV_G3_MACRT_TxCfmCallbackRegisterAllows 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_DataIndCallbackRegisterAllows 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_RxParamsIndCallbackRegisterAllows 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_MacSnifferCallbackRegisterAllows 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_CommStatusCallbackRegisterAllows 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_PhySnifferCallbackRegisterAllows 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_ExceptionCallbackRegisterAllows 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_ExternalInterruptHandlerAllows application to register callback for PLC Interrupt pin
DRV_G3_MACRT_StatusGets the current status of the PLC driver module
DRV_G3_MACRT_TasksMaintains the driver's state machine
DRV_G3_MACRT_SleepIndCallbackRegisterAllows 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_SleepPLC driver Sleep mode management
DRV_G3_MACRT_EnableTXEnables/Disables PLC transmission

Data types and constants

NameTypeDescription
DRV_G3_MACRT_EXCEPTIONEnumDefines the type for G3 MAC RT Driver transfer errors
DRV_G3_MACRT_TX_CFM_CALLBACKTypedefPointer to a MAC RT Driver Transmission Confirm Event handler function
DRV_G3_MACRT_DATA_IND_CALLBACKTypedefPointer to a G3 MAC RT Driver Reception Event handler function
DRV_G3_MACRT_RX_PARAMS_IND_CALLBACKTypedefPointer to a G3 MAC RT Driver Event handler function to get parameters from the last received message
DRV_G3_MACRT_MAC_SNIFFER_IND_CALLBACKTypedefPointer to a G3 MAC RT Sniffer Reception Event handler function
DRV_G3_MACRT_COMM_STATUS_IND_CALLBACKTypedefPointer to a G3 MAC RT Communication Status Event handler function
DRV_G3_MACRT_PHY_SNIFFER_IND_CALLBACKTypedefPointer to a G3 MAC RT PHY Sniffer Reception Event handler function
DRV_G3_MACRT_EXCEPTION_CALLBACKTypedefPointer to a G3 MAC RT Driver Exceptions Event handler function
DRV_G3_MACRT_SLEEP_IND_CALLBACKTypedefNotifies when Sleep Mode is disabled and MAC RT driver is available to be used again
MAC_RT_TX_CFM_OBJStructIncludes a transmission result and timestamp
MAC_RT_RX_PARAMETERS_OBJStructIncludes information to describe any new received message
MAC_RT_STATUSEnumList of possible retun values for G3 MAC RT Driver functions
MAC_RT_PIB_OBJStructObject to access the MAC RT and PHY Information Base
MAC_RT_PIBEnumList of available MAC RT Information Base objects
MAC_RT_PHY_PIBEnumList of available PHY Information Base objects
DRV_G3_MACRT_INITStructContains the data required to initialize the PLC driver
DRV_PLC_HAL_INTERFACEStructContains the data required to initialize the PLC driver HAL Interface
DRV_PLC_PLIB_INTERFACEStructContains the data required to initialize the PLC driver PLIB Interface