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_InitCallbackRegisterAllows a client to set a G3 MAC RT initialization event handling function for the driver to call back when the PLC binary file has been loaded into the PLC transceiver
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
DRV_G3_MACRT_SetCoordinatorEnables G3-PLC coordinator capabilities
DRV_G3_MACRT_SetBandSets G3-PLC band
DRV_G3_MACRT_EnablePhySnifferEnables G3-PLC PHY Sniffer capabilities

Data types and constants

NameTypeDescription
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
DRV_G3_MACRT_STATEEnumThis data type defines the states of the G3 MAC RT Driver. It is used as output of DRV_G3_MACRT_Status
DRV_G3_MACRT_EXCEPTIONEnumDefines the type for G3 MAC RT Driver transfer errors
DRV_G3_MACRT_INIT_CALLBACKTypedefPointer to a G3 MAC RT Driver Initialization Event handler function
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 return values for G3 MAC RT Driver functions
MAC_RT_PIB_OBJStructObject to access the MAC RT and PHY Information Base (PIB)
MAC_RT_PIBEnumList of available MAC RT Information Base objects
MAC_RT_PHY_PIBEnumList of available PHY Information Base objects
MAC_RT_BANDEnumThe list of G3-PLC bandplans
MAC_RT_TONE_MAPStructTone Map definition supported by G3-PLC spec
MAC_RT_TONE_MASKStructTone Mask definition supported by G3-PLC spec
MAC_RT_MOD_TYPEEnumThe list of all types of modulation supported by G3-PLC spec
MAC_RT_MOD_SCHEMEEnumThe list of all modulation schemes supported by G3-PLC spec
MAC_RT_TONE_MAP_RSP_DATAStructThis struct includes Modulation Type, Modulation Scheme and Tone Map data
MAC_RT_ADDRESS_MODEEnumThe list of addressing modes supported by G3 spec
MAC_RT_EXT_ADDRESSStructThis struct includes Extended Address (EUI64)
MAC_RT_ADDRESSStructThis struct includes addressing mode and address (short or extended)
MAC_RT_FRAME_TYPEEnumThe list of MAC frame types supported by G3 spec
MAC_RT_COMMANDEnumThe list of MAC commands supported by G3 spec
MAC_RT_DSN_TABLE_ENTRYStructThis data type defines a G3 MAC DSN Table entry
MAC_RT_POS_ENTRYStructThis data type defines a G3 MAC POS entry
MAC_RT_TX_COEFStructThis data type defines the G3-PLC TX coefficients
MAC_RT_NEIGHBOUR_ENTRYStructThis data type defines a G3-PLC MAC Neighbour Table entry
MAC_RT_FRAME_CONTROLStructThis data type includes information related to the G3 MAC frame control field
MAC_RT_SEGMENT_CONTROLStructThis data type includes information related to the G3-PLC MAC segment control field
MAC_RT_AUX_SECURITY_HEADERStructThis data type includes information related to the G3 MAC Auxiliary Security Header
MAC_RT_HEADERStructThis data type includes information related to the G3 MAC Header
MAC_RT_TONE_MAP_RESPONSEStructThis data type includes information related to the G3-PLC Tone Map Response frame
MAC_RT_MIB_INIT_OBJStructDefines the data required to initialize the G3-PLC MAC RT MIB layer
MAC_RT_PHY_SNIFFER_HEADERStructThis data type includes information about G3-PLC PHY Sniffer packet