KSduino 

 The Device Network
Your IP Address is: 54.161.130.145

DOCUMENTATION

KSduinoParameter Class Reference

Subclass with additional functions for working with parameters. More...

#include <KSduino.h>

List of all members.

Public Member Functions

 KSduinoParameter (KSduino *ksd, char *parameter_name, float parameter_accuracy=0.00, uint16_t rt=0, byte parameter_sendall=0)
 Constructor to define KSduinoParameter subclass.
template<typename ValueType >
int addParameter (ValueType value)
 Add parameter.
char * name (void)
 Get this parameter name.
template<typename ValueType >
int check (ValueType value)
 Check if this parameter ready to send.

Detailed Description

Subclass with additional functions for working with parameters.

Author:
Kirill Scherba
Version:
0.0.1
Date:
2012

This is subclass to manage KSduino parameters. It used to define parameters which sends to KSduino Device Network.

Examples:
control_01.ino, send_to_other.ino, send_to_other_sender.ino, and simple_06.ino.

Definition at line 347 of file KSduino.h.


Constructor & Destructor Documentation

KSduinoParameter::KSduinoParameter ( KSduino ksd,
char *  parameter_name,
float  parameter_accuracy = 0.00,
uint16_t  rt = 0,
byte  parameter_sendall = 0 
) [inline]

Constructor to define KSduinoParameter subclass.

Parameters:
[in]ksdReference to KSduino class
[in]parameter_nameParameter name
[in]parameter_accuracyAccuracy of parameter: difference between previouse and current value. Values sends to server if difference between previouse and current value more than parameter_sendall value.
[in]rtRepeat time: time in seconds after which one parameters value wil be sent even though values of parameter_sendall and parameter_accuracy
[in]parameter_sendallSend all values: 0 - send only different values (default), 1 - send all values

Definition at line 367 of file KSduino.h.


Member Function Documentation

template<typename ValueType >
int KSduinoParameter::addParameter ( ValueType  value) [inline]

Add parameter.

Parameters:
[in]valueParameters value
Returns:
1 - if this parametr added, or 0 - if this parameter not ready to send (see KSduinoParameter::check)

This function shoud be send between KSduino::beginPacket and KSduino::endPacket functions. This function adds parameter and it value to paket started with KSduino::beginPacket function.

See KSduino::beginPacket, KSduino::addParameter and KSduino::endPacket to get additional information.

Definition at line 428 of file KSduino.h.

References KSduino::addParameter(), check(), and name().

template<typename ValueType >
int KSduinoParameter::check ( ValueType  value) [inline]

Check if this parameter ready to send.

Parameters:
[in]valueParameters value
Returns:
1 - if this Parameters value is ready to send

Definition at line 457 of file KSduino.h.

Referenced by addParameter().

char* KSduinoParameter::name ( void  ) [inline]

Get this parameter name.

Returns:
parameter name char* array

Definition at line 442 of file KSduino.h.

Referenced by addParameter().


The documentation for this class was generated from the following file:
Created with KSNews

HOME | CONTACTS | INFORMER | SHORTENER | DOCUMENTATION | HELP

Copyright © 2012-2013, The KSduino Project