BayEOS-Arduino  1.8.0_0.0.4
Public Member Functions | Public Attributes | List of all members
BayGPRSInterface Class Referenceabstract
Inheritance diagram for BayGPRSInterface:
BayTCPInterface BayEOS BayGPRS BayGPRSPlus BayGPRSsoftserial

Public Member Functions

uint8_t sendSMS (const String &phone, const String &sms)
 
uint8_t connect (void)
 
void disconnect (void)
 
uint8_t getRSSI (void)
 
uint8_t setClock (const char *time)
 
DateTime now (void)
 
uint8_t begin (long baud, uint8_t unlock_only=0)
 
uint8_t changeIPR (long baud)
 
uint8_t isRegistered (void)
 
uint8_t isAttached (void)
 
void softSwitch (void)
 
void softReset (void)
 
uint8_t init (uint8_t unlock_only=0)
 
virtual void i_begin (long baud)=0
 
virtual void i_end (void)=0
 
void flushMTU (void)
 
void finishTransmissionMode (void)
 
- Public Member Functions inherited from BayTCPInterface
uint8_t sendPayload (void)
 
uint8_t sendMultiFromBuffer (uint16_t maxsize=5000)
 
void setConfig (const char *str, uint8_t index)
 
void readConfigFromStringPGM (const char *string)
 
void readConfigFromFile (const char *file)
 
void readConfigFromEEPROM (int eeoffset=BayTCP_EEPROM_OFFSET)
 
void writeConfigToEEPROM (int eeoffset=BayTCP_EEPROM_OFFSET)
 
const char * getConfig (void)
 
const uint8_t * parseMAC (const char *str)
 
const uint8_t * parseIP (const char *str)
 
uint8_t hex2int (const char c)
 
char ** getConfigPointer (uint8_t index)
 
- Public Member Functions inherited from BayEOS
 BayEOS (void)
 
virtual uint8_t readIntoPayload (int timeout=5000)
 
virtual int available (void)
 
uint8_t sendError (const String &s)
 
uint8_t sendMessage (const String &s)
 
void startFrame (uint8_t type)
 
void startOriginFrame (const String &o, uint8_t routed=0)
 
void startDataFrame (uint8_t subtype=BayEOS_Float32le, uint8_t checksum=0)
 
void startDataFrameWithOrigin (uint8_t subtype, const String &o, uint8_t checksum=0, uint8_t routed=0)
 
uint8_t addChannelValue (float v, uint8_t channel_number=0)
 
uint8_t addChannelValue (double v, uint8_t channel_number=0)
 
uint8_t addChannelValue (long v, uint8_t channel_number=0)
 
uint8_t addChannelValue (unsigned long v, uint8_t channel_number=0)
 
uint8_t addChannelValue (int v, uint8_t channel_number=0)
 
uint8_t addChannelValue (unsigned int v, uint8_t channel_number=0)
 
uint8_t addChannelValue (int8_t v, uint8_t channel_number=0)
 
uint8_t addChannelValue (uint8_t v, uint8_t channel_number=0)
 
uint8_t addChannelValue (float v, const char *channel_label)
 
uint8_t addChannelValue (double v, const char *channel_label)
 
uint8_t addChannelValue (long v, const char *channel_label)
 
uint8_t addChannelValue (unsigned long v, const char *channel_label)
 
uint8_t addChannelValue (int v, const char *channel_label)
 
uint8_t addChannelValue (unsigned int v, const char *channel_label)
 
uint8_t addChannelValue (int8_t v, const char *channel_label)
 
uint8_t addChannelValue (uint8_t v, const char *channel_label)
 
uint8_t addChecksum (void)
 
uint8_t validateChecksum (void)
 
void startRoutedFrame (uint16_t sourceMyID, uint16_t sourcePANID, uint8_t rssi=0)
 
void startDelayedFrame (unsigned long delay)
 
void startTimestampFrame (unsigned long timestamp)
 
void startCommand (uint8_t cmd_api)
 
void startCommandResponse (uint8_t cmd_api)
 
uint8_t addToPayload (uint8_t b)
 
uint8_t addToPayload (const void *p, uint8_t length)
 
uint8_t addToPayload (const uint8_t *c)
 
uint8_t addToPayload (const String &s)
 
uint8_t addToPayload (float f)
 
uint8_t addToPayload (unsigned long l)
 
uint8_t addToPayload (long l)
 
uint8_t addToPayload (int w)
 
uint8_t addToPayload (uint16_t w)
 
uint8_t getPayloadBytesLeft (void) const
 
uint8_t getPayloadLength (void) const
 
uint8_t getPacketLength (void) const
 
const uint8_t * getPayload (void) const
 
uint8_t getPayload (uint8_t index) const
 
uint8_t sendOrBuffer (void)
 
uint8_t sendFromBuffer (void)
 
uint8_t writeToBuffer (void)
 
uint8_t readFromBuffer (void)
 
uint8_t readBinaryFromBuffer (unsigned long pos)
 
uint8_t readBinaryFromBuffer (unsigned long pos, unsigned long end, unsigned long vpos)
 
void setBuffer (BayEOSBuffer &buffer, uint16_t max_skip=0)
 

Public Attributes

long _baud
 
uint8_t _powerPin
 
uint8_t _resetPin
 
- Public Attributes inherited from BayTCPInterface
boolean _urlencode
 
- Public Attributes inherited from BayEOS
uint8_t _payload [BayEOS_MAX_PAYLOAD]
 
uint8_t _next
 
uint8_t _success
 
uint8_t _failure_counter
 
uint16_t _max_skip
 
uint16_t _skip_counter
 
BayEOSBuffer_buffer
 

Additional Inherited Members

- Protected Member Functions inherited from BayTCPInterface
virtual int i_available ()=0
 
void printPostHeader (uint16_t size)
 
void setConfigPointers (void)
 
uint8_t addToConfigBuffer (uint8_t offset, const char *str)
 
void skipChars (void)
 
uint8_t wait_forOK (uint16_t timeout)
 
uint8_t wait_forPGM (const char *str, uint16_t timeout, uint8_t bytes=0, char *buffer=NULL)
 
uint8_t wait_for_available (uint16_t *timeout, int bytes=1)
 
void printPGM (const char *str)
 
void printlnPGM (const char *str)
 
void serialprintPGM (const char *str)
 
void serialprintlnPGM (const char *str)
 
int strlenURLencoded (const char *str)
 
void printURLencoded (const char *str)
 
- Protected Attributes inherited from BayTCPInterface
uint8_t _mac_ip [6]
 
char _config_buffer [BayTCP_CONFIG_SIZE]
 
char _pgm_buffer [20]
 
char * _server
 
char * _port
 
char * _path
 
char * _user
 
char * _password
 
char * _sender
 
char * _apn
 
char * _prov_pw
 
char * _prov_user
 
char * _pin
 
char _base64buffer [BayTCP_BUFFER]
 
uint8_t _tx_error_count
 
uint16_t _mtu
 
- Static Protected Attributes inherited from BayTCPInterface
static const char *const _urlencodedChars ="$&+,/:;=?@ <>#%{}|~[]`"
 

Detailed Description

Definition at line 24 of file BayTCPSim900.h.

Member Function Documentation

◆ begin()

uint8_t BayGPRSInterface::begin ( long  baud,
uint8_t  unlock_only = 0 
)

Switch on GPRS-Modem 0 == GPRS-modem is up and responding OK 1 == Communication-ERROR 2 == PIN failed 3 == PIN locked 4 == Not CREG 5 == Not CGATT 6 == No SIM Card

if unlock_only is set, function returns already after unlocking the modem

Definition at line 315 of file BayTCPSim900.cpp.

◆ connect()

uint8_t BayGPRSInterface::connect ( void  )
virtual

Connect to the web through apn 0 == OK 1 == Network TIMEOUT 2 == NO Communication 3 == PIN failed 4 == PIN locked 5 == Not CREG 6 == Not CGATT 7 == No SIM Card Omit, if you just want to send SMS

Implements BayTCPInterface.

Definition at line 235 of file BayTCPSim900.cpp.

◆ disconnect()

void BayGPRSInterface::disconnect ( void  )
virtual

Disconnect from the web

Implements BayTCPInterface.

Definition at line 292 of file BayTCPSim900.cpp.

◆ getRSSI()

uint8_t BayGPRSInterface::getRSSI ( void  )

Disconnect from the web

Definition at line 161 of file BayTCPSim900.cpp.

◆ init()

uint8_t BayGPRSInterface::init ( uint8_t  unlock_only = 0)

Switch on GPRS-Modem 0 == OK 1 == NO Communication 2 == PIN failed 3 == PIN locked 4 == Not CREG 5 == Not CGATT 6 == No SIM Card

Definition at line 39 of file BayTCPSim900.cpp.

◆ isAttached()

uint8_t BayGPRSInterface::isAttached ( void  )

Checks if modem is attached to network

Definition at line 178 of file BayTCPSim900.cpp.

◆ isRegistered()

uint8_t BayGPRSInterface::isRegistered ( void  )

Checks if modem is registered to network

Definition at line 169 of file BayTCPSim900.cpp.

◆ now()

DateTime BayGPRSInterface::now ( void  )

Get time from RTC

Definition at line 186 of file BayTCPSim900.cpp.

◆ sendSMS()

uint8_t BayGPRSInterface::sendSMS ( const String &  phone,
const String &  sms 
)

Send SMS Use international phone numbers +49151xxxxx

Definition at line 301 of file BayTCPSim900.cpp.

◆ setClock()

uint8_t BayGPRSInterface::setClock ( const char *  time)

Set RTC time has to be in the format "YY/MM/DD,HH:MM:SS-01"

Definition at line 146 of file BayTCPSim900.cpp.

◆ softReset()

void BayGPRSInterface::softReset ( void  )

perform software reset operation only works if a resetPin is set

Definition at line 130 of file BayTCPSim900.cpp.

◆ softSwitch()

void BayGPRSInterface::softSwitch ( void  )

/** perform soft switch operation will switch on/off modem

Definition at line 116 of file BayTCPSim900.cpp.


The documentation for this class was generated from the following files: