# class ETSIModem | An analog signal processor as defined by ETSI. More...
Full name | `TelEngine::ETSIModem`
Definition | `#include <libs/ymodem/yatemodem.h>`
Inherits | TelEngine::UART [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Types

- enum State { StateError, WaitFSKStart, WaitMark, WaitMsg, WaitMsgLen, WaitParam, WaitParamLen, WaitData, WaitChksum, }
- enum MsgType { MsgCallSetup = 0x80, MsgMWI = 0x82, MsgCharge = 0x86, MsgSMS = 0x89, }
- enum MsgParam { DateTime = 0x01, CallerId = 0x02, CalledId = 0x03, CallerIdReason = 0x04, CallerName = 0x07, CallerNameReason = 0x08, VisualIndicator = 0x0B, MessageId = 0x0D, LastMsgCLI = 0x0E, CompDateTime = 0x0F, CompCallerId = 0x10, CallType = 0x11, FirstCalledId = 0x12, MWICount = 0x13, FwdCallType = 0x15, CallerType = 0x16, RedirNumber = 0x1A, Charge = 0x20, AdditionalCharge = 0x21, Duration = 0x23, NetworkID = 0x30, CarrierId = 0x31, SelectFunction = 0x40, Display = 0x50, ServiceInfo = 0x55, Extension = 0xE0, Unknown }

#### Public Methods

- ETSIModem (const NamedList& params, const char* name = 0)
- virtual ~ETSIModem ()
- virtual void reset ()
- virtual bool recvByte (unsigned char data)

#### Public Members

- static TokenDict s_msg[]
- static TokenDict s_msgParams[]

#### Protected Methods

- virtual int idleRecvByte (unsigned char data)
- virtual bool recvParams (MsgType msg, const NamedList& params)
- virtual bool decode (MsgType msg, const DataBlock& buffer)
- virtual bool createMsg (NamedList& params, DataBlock& data)

## Detailed Description

This class implements a modem/UART pair used to demodulate/decode analog signal as defined in ETSI EN 300 659-1, ETSI EN 300 659-2, ETSI EN 300 659-3

enum State { StateError, WaitFSKStart, WaitMark, WaitMsg, WaitMsgLen, WaitParam, WaitParamLen, WaitData, WaitChksum, } | ### State

The state of this ETSI decoder

enum MsgType { MsgCallSetup = 0x80, MsgMWI = 0x82, MsgCharge = 0x86, MsgSMS = 0x89, } | ### MsgType

Message type defined in ETSI EN 659-3 5.2

enum MsgParam { DateTime = 0x01, CallerId = 0x02, CalledId = 0x03, CallerIdReason = 0x04, CallerName = 0x07, CallerNameReason = 0x08, VisualIndicator = 0x0B, MessageId = 0x0D, LastMsgCLI = 0x0E, CompDateTime = 0x0F, CompCallerId = 0x10, CallType = 0x11, FirstCalledId = 0x12, MWICount = 0x13, FwdCallType = 0x15, CallerType = 0x16, RedirNumber = 0x1A, Charge = 0x20, AdditionalCharge = 0x21, Duration = 0x23, NetworkID = 0x30, CarrierId = 0x31, SelectFunction = 0x40, Display = 0x50, ServiceInfo = 0x55, Extension = 0xE0, Unknown } | ### MsgParam

Message parameters defined in ETSI EN 659-3 5.3

ETSIModem (const NamedList& params, const char* name = 0) | ### ETSIModem

Constructor

Parameters:

params | Decoder parameters
name | The name of this debug enabler

~ETSIModem () | ### ~ETSIModem

[virtual]

Destructor

void reset () | ### reset

[virtual]

Reset this decoder (modem and UART)

Reimplemented from UART.

bool recvByte (unsigned char data) | ### recvByte

[virtual]

Push a data byte into this decoder. Reset this UART and call decode after validated a received message

Parameters:

data | The byte to be processed

Returns: False to stop feeding data

Reimplemented from UART.

static TokenDict s_msg[] | ### s_msg[]

static TokenDict s_msgParams[] | ### s_msgParams[]

int idleRecvByte (unsigned char data) | ### idleRecvByte

[protected virtual]

Process an accumulated byte in Idle state

Parameters:

data | The byte to process

Returns: Negative to stop, positive to change state to BitStart, 0 to continue

Reimplemented from UART.

bool recvParams (MsgType msg, const NamedList& params) | ### recvParams

[protected virtual]

Process a list of received message parameters

Parameters:

msg | The message type as enumeration
params | Message parameters

Returns: False to stop processing data

bool decode (MsgType msg, const DataBlock& buffer) | ### decode

[protected virtual]

Process (decode) a valid received buffer. Call recvParams() after decoding the message

Parameters:

msg | The message type as enumeration
buffer | The accumulated data bytes

Returns: False to stop processing data

bool createMsg (NamedList& params, DataBlock& data) | ### createMsg

[protected virtual]

Create a buffer containing the byte representation of a message to be sent

Parameters:

params | The list containing message parameters. The name of the list must be a valid (known) message
data | Destination message data buffer

Returns: False on failure (an 'error' parameter will be set in params)

Reimplemented from UART.

Generated by: paulc on bussard on Mon Feb 10 13:15:47 2014, using kdoc 2.0a54.