NewAskSin
 All Classes Files Functions Variables Groups Pages
Classes | Public Member Functions | Public Attributes | Protected Member Functions | Friends | List of all members
AS Class Reference

Main class for implementation of the AskSin protocol stack. Every device needs exactly one instance of this class. More...

#include <AS.h>

Public Member Functions

void init (void)
 Initialize the AS module. More...
 
void poll (void)
 Poll routine for regular operation. More...
 
void sendDEVICE_INFO (void)
 
void sendACK (void)
 
void sendACK_STATUS (uint8_t cnl, uint8_t stat, uint8_t dul)
 
void sendNACK (void)
 
void sendNACK_TARGET_INVALID (void)
 
void sendINFO_ACTUATOR_STATUS (uint8_t cnl, uint8_t stat, uint8_t cng)
 
void sendINFO_TEMP (void)
 
void sendHAVE_DATA (void)
 
void sendSWITCH (void)
 
void sendTimeStamp (void)
 
void sendREMOTE (uint8_t cnl, uint8_t burst, uint8_t *pL)
 
void sendSensor_event (uint8_t cnl, uint8_t burst, uint8_t *pL)
 
void sendSensorData (void)
 
void sendClimateEvent (void)
 
void sendSetTeamTemp (void)
 
void sendWeatherEvent (void)
 
void send_generic_event (uint8_t cnl, uint8_t burst, uint8_t mTyp, uint8_t len, uint8_t *pL)
 Send an event with arbitrary payload. More...
 

Public Attributes

EE ee
 eeprom module
 
SN sn
 send module
 
RG rg
 user module registrar
 
CB confButton
 config button
 
LD ld
 status led
 
PW pw
 power management
 
CC cc
 load communication module
 
BT bt
 

Protected Member Functions

void decode (uint8_t *buf)
 
void encode (uint8_t *buf)
 
void explainMessage (uint8_t *buf)
 

Friends

class SN
 
class RV
 
class RG
 
class PW
 

Detailed Description

Main class for implementation of the AskSin protocol stack. Every device needs exactly one instance of this class.

AS is responsible for maintaining the complete infrastructure from device register representation, non-volatile storage of device configuration in the eeprom, to providing interfaces for user modules that implement actual device logic.

This is a very simple, non-working example of the basic API used in the main routines:

#include <AS.h>
#include "register.h" // configuration sheet
AS hm; // stage the asksin framework
void setup() {
hm.init(); // init the asksin framework
}
void loop()
{
hm.poll(); // poll the homematic main loop
}

All send functions are used by sensor or actor classes like THSensor or Dimmer.

Member Function Documentation

void AS::init ( void  )

Initialize the AS module.

init() has to be called from the main setup() routine.

void AS::poll ( void  )

Poll routine for regular operation.

poll() needs to be called regularily from the main loop(). It takes care of all major tasks like sending and receiving messages, device configuration and message delegation.

void AS::send_generic_event ( uint8_t  cnl,
uint8_t  burst,
uint8_t  mTyp,
uint8_t  len,
uint8_t *  pL 
)

Send an event with arbitrary payload.

Take care when sending generic events, since there are no consistency checks if the specified event type and payload make any sense. Rather use predefined special send methods.

Parameters
cnlThe channel
burstSet to 1 for burst mode, or 0
mTypEvent frame type
lenLength of payload in bytes, not more than 16
pLpointer to first byte of payload
Attention
The payload length may not exceed 16 bytes. If a greater value for len is given, it is limited to 16 to prevent HM-CFG-LAN (v0.961) to crash.

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