Appiko
Data Structures | Macros | Enumerations | Functions
S2LP_PktWMbus.h File Reference

Configuration and management of S2-LP WMbus packets. More...

#include "S2LP_Regs.h"
#include "S2LP_Types.h"
#include "S2LP_PacketHandler.h"

Go to the source code of this file.

Data Structures

struct  PktWMbusInit
 S2LP WMBUS Packet Init structure definition. More...
 

Macros

#define S2LPPktWMbusSetPreambleLength(xPreambleLength)   S2LPPktCommonSetPreambleLength((PktPreambleLength)xPreambleLength)
 Sets the PREAMBLE field length for S2LP Basic packets. More...
 
#define S2LPPktWMbusGetPreambleLength()   S2LPPktCommonGetPreambleLength()
 Returns the PREAMBLE field length mode for S2LP Basic packets. More...
 

Enumerations

enum  WMbusSubmode {
  WMBUS_SUBMODE_NOT_CONFIGURED = 0, WMBUS_SUBMODE_S1_S2_LONG_HEADER, WMBUS_SUBMODE_S1_M_S2_T2_OTHER_TO_METER, WMBUS_SUBMODE_T1_T2_METER_TO_OTHER,
  WMBUS_SUBMODE_R2_SHORT_HEADER
}
 WMbus submode enumeration. More...
 

Functions

void S2LPPktWMbusInit (PktWMbusInit *pxPktWMbusInit)
 Initialize the S2LP WMBUS packet according to the specified parameters in the PktWMbusInit struct. More...
 
void S2LPPktWMbusGetInfo (PktWMbusInit *pxPktWMbusInit)
 Return the S2LP WMBUS packet structure according to the specified parameters in the registers. More...
 
void S2LPPktWMbusSetFormat (void)
 Configure the WMBUS packet format as the one used by S2LP. More...
 
void S2LPPktWMbusSetPostamble (uint8_t cPostamble)
 Set how many chips will be used in postamble. More...
 
uint8_t S2LPPktWMbusGetPostamble (void)
 Returns how many chips are used in the postamble. More...
 
void S2LPPktWMbusSetPostamblePattern (uint8_t cPostamble)
 Set the pattern of the postamble. More...
 
uint8_t S2LPPktWMbusGetPostamblePattern (void)
 Returns the pattern of the postamble. More...
 
void S2LPPktWMbusSetSubmode (WMbusSubmode xWMbusSubmode)
 Set the W-MBus submode. More...
 
WMbusSubmode S2LPPktWMbusGetSubmode (void)
 Return the WMBUS submode used. More...
 
void S2LPPktWMbusSetPayloadLength (uint16_t nPayloadLength)
 Sets the payload length for S2LP WMBUS packets. More...
 
uint16_t S2LPPktWMbusGetPayloadLength (void)
 Return the payload length for WMBUS packets. More...
 

Detailed Description

Author
LowPower RF BU - AMG
Version
1.2.1
Date
16-April-2018

This module can be used to manage the configuration of S2-LP WMbus packets. The user can obtain a packet configuration filling the structure PktWMbusInit, defining in it some general parameters for the S2-LP WMbus packet format. Since the WMbus protocol is a standard, the configuration of a WMbus packet is very simple to do.

Example:

PktWMbusInit mbusInit={
WMbus_SUBMODE_S1_S2_LONG_HEADER, // WMbus submode selection
36, // added "01" chips on preamble
16 // postamble length in "01" chips
};
...
S2LPPktWMbusInit(&mbusInit);
...

The module provides some other functions that can be used to modify or read only some configuration parameters.

THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

THIS SOURCE CODE IS PROTECTED BY A LICENSE. FOR MORE INFORMATION PLEASE CAREFULLY READ THE LICENSE AGREEMENT FILE LOCATED IN THE ROOT DIRECTORY OF THIS FIRMWARE PACKAGE.

© COPYRIGHT 2016 STMicroelectronics

Definition in file S2LP_PktWMbus.h.