1.2.2.4.7 SRV_PSNIFFER_SetPLCChannel Function
C
void SRV_PSNIFFER_SetPLCChannel ( uint8_t channel );
Summary
Sets PLC channel to be used on PLC Sniffer.
Description
This function allows setting the right PLC channel to listed to. If misconfigured, no PLC frames will be seen.
Precondition
None.
Parameters
Param | Description |
---|---|
channel | The PLC channel to listen to |
Returns
None.
Example
switch (command) { case SRV_PSNIFFER_CMD_SET_PLC_CHANNEL: { DRV_PLC_PHY_CHANNEL channel; channel = *(pData + 1); if ((appData.channel != channel) && (channel >= CHN1) && (channel <= CHN7_CHN8)) { appData.channel = channel; /* Set channel configuration */ appData.plcPIB.id = PLC_ID_CHANNEL_CFG; appData.plcPIB.length = 1; *appData.plcPIB.pData = channel; DRV_PLC_PHY_PIBSet(appData.drvPl360Handle, &appData.plcPIB); /* Update channel in PSniffer */ SRV_PSNIFFER_SetPLCChannel(appData.channel); } } break; /* ... */ }
Remarks
This function is only available in PRIME PLC profile.