AskSin++
Static Public Member Functions | List of all members
as::AskSinBase Class Reference

#include <AskSinPP.h>

Inheritance diagram for as::AskSinBase:
Inheritance graph
[legend]

Static Public Member Functions

static void pgm_read (uint8_t *dest, uint16_t adr, uint8_t size)
 
static uint8_t toChar (uint8_t c)
 
static uint16_t crc16 (uint16_t crc, uint8_t d)
 
static uint32_t crc24 (const uint8_t *data, int len)
 
static uint32_t crc24 (uint32_t crc, uint8_t d)
 
static uint32_t byteTimeCvt (uint8_t tTime)
 
static uint32_t byteTimeCvtSeconds (uint8_t tTime)
 
static uint32_t intTimeCvt (uint16_t iTime)
 
static uint32_t nextSendSlot (const HMID &id, uint8_t msgcnt)
 
static uint8_t readPin (uint8_t pinnr, uint8_t enablenr=0, uint8_t ms=0)
 

Detailed Description

AskSinBase provides basic methods for general use.

Definition at line 71 of file AskSinPP.h.

Member Function Documentation

◆ crc16()

static uint16_t as::AskSinBase::crc16 ( uint16_t  crc,
uint8_t  d 
)
inlinestatic

Update CRC16 value

Parameters
crccurrent checksum value
datato add
Returns
new crc checksum value

Definition at line 99 of file AskSinPP.h.

◆ crc24() [1/2]

static uint32_t as::AskSinBase::crc24 ( const uint8_t *  data,
int  len 
)
inlinestatic

Calculate CRC24 value from data

Parameters
datapointer to data to calculate CRC checksum
lennumber of bytes to use for calculation
Returns
CRC24 checksum

Definition at line 113 of file AskSinPP.h.

◆ crc24() [2/2]

static uint32_t as::AskSinBase::crc24 ( uint32_t  crc,
uint8_t  d 
)
inlinestatic

Update CRC24 value

Parameters
crccurrent checksum value
datato add
Returns
new crc checksum value

Definition at line 127 of file AskSinPP.h.

◆ nextSendSlot()

static uint32_t as::AskSinBase::nextSendSlot ( const HMID id,
uint8_t  msgcnt 
)
inlinestatic

Calculate time until next send slot

Parameters
idHomematic ID of the device
msgcntcurrent message counter
Returns
next send slot in sysclock ticks

Definition at line 169 of file AskSinPP.h.

◆ pgm_read()

static void as::AskSinBase::pgm_read ( uint8_t *  dest,
uint16_t  adr,
uint8_t  size 
)
inlinestatic

Read data from program space (AVR).

Parameters
destpointer to destiantion in RAM
adraddress of program space to read data from
sizeof data to read

Definition at line 80 of file AskSinPP.h.

◆ readPin()

static uint8_t as::AskSinBase::readPin ( uint8_t  pinnr,
uint8_t  enablenr = 0,
uint8_t  ms = 0 
)
inlinestatic

Read status of pin.

Parameters
pinnrthe number of the pin to read
enablenrpin to set to high for enabling the read
msmilli seconds to wait between enablement and pin read
Returns
status of read pin

Definition at line 186 of file AskSinPP.h.

◆ toChar()

static uint8_t as::AskSinBase::toChar ( uint8_t  c)
inlinestatic

Convert numeric value to character for printing.

Parameters
cnumeric value to convert
Returns
character for output

Definition at line 90 of file AskSinPP.h.