TOOTHPIC RF Solutions, TOOTHPIC Datasheet - Page 98

MODULE, BLUETOOTH, DATA ACQUISITION

TOOTHPIC

Manufacturer Part Number
TOOTHPIC
Description
MODULE, BLUETOOTH, DATA ACQUISITION
Manufacturer
RF Solutions
Datasheet

Specifications of TOOTHPIC

Svhc
No SVHC (15-Dec-2010)
// Set_List5_5( pRLong, pLong ) sets List5 value.
integer
// or pULong must be pointer to 4-byte signed integer, the other pointer must be zero
#define Set_List5_5( pRLong, pULong ) SetBytes( STR_RAM, 0x002C, pRULong, pULong, sizeof(long) )
// SetUp_List5_5( pRLong, pLong ) sets List5 value and automatically updates client if connected
#define SetUp_List5_5( pRLong, pLong ) { Set_List5_5( pRLong, pLong );
// NumItem_List5_5 is the number of items in the list
#define NumItem_List5_5 3
The ID will always be specified. For most controls, a Get_ function is always provided to retrieve the data, a
Set_ function to set the data value and a SetUp_ function to set the value and update the value on the client
at the same time. If the data is directly accessible as a pointer, a pointer is also provided. (Bear in mind that
you cannot set the value referenced by a ROM pointer – you need to use the Set_ macro.) Examples:
The Matrix control value is more complex and is composed of three parts: (i) the cell values, (ii) the row value
(XY and Date-Time types only), (iii) the Matrix Row Counter. The Cell values are set using the Set_Cell
macro, etc; the row value, if appropriate, is set using the Set_Row macro, etc.
The Matrix Row Counter indicates the number of rows of data which contain meaningful values and is
accessed using the Set_RowCounter macro, etc. It is initialized to zero. When you add data to a matrix row,
you must set the value of the Row Counter also. Do not set it to a new value until all the data in that row are
valid. You can also append data to the matrix in a first-in first-out (FIFO) fashion. To do this, set the data in
the row value indicated by the AppendRow_ macro. Then instead of modifying the Row Counter directly,
execute the NextAppendRow_ macro to move the row pointer on to the next position. When the matrix is full,
the Row Counter value becomes negative indicating to the client that all values are valid and offset in a
circular buffer fashion. Examples:
FxPC_PartUpdate: Sends a single row of matrix data to the client. The row data should be modified
beforehand using the macros defined in the header file generated by FlexiPanel Designer. Part updates are
only possible from version 3 of the FlexiPanel Protocol. If the client device is version 2, a full update will
automatically be sent instead. The following example shows FxPC_PartUpdate used for data logging to a
matrix.
Page 98
// increment list selection by Get_ and SetUp_ macros
long lVal;
Get_List5_5( &lVal );
lVal = lVal + 1;
SetUp_List5_5( &lVal );
// increment list selection by pointer macros
*plList5_5 = *plList5_5 + 1;
FxPCommand( FxPC_CtlUpdate, ID_List5_5, 0 );
// setting the values of a labels style control
short Row, Col;
char cVal;
long lVal;
for (Row = 0; Row < MaxRow_Matrix3_3; Row++)
{
}
lVal = MaxRow_Matrix3_3;
Set_Matrix3_3_RowCounter( 0, &lVal );
// appending a value to a DateTime style control
char cVal = 123;
Set_Matrix4_4_Cell( 0, & cVal, AppendRow_Matrix4_4, 0 );
Set_Matrix4_4_Row( 0, &RealTimeClock, AppendRow_Matrix4_4 );
NextAppendRow_Matrix4_4;
FxPCommand( FxPC_CtlUpdate, ID_Matrix4_4 );
for (Col = 0; Col < NumCol_Matrix3_3; Col++)
{
}
9-Apr-06
cVal = Row + Col * 10;
Set_Matrix3_3_Cell( 0, &cVal, Row, Col );
Toothpick 3.0.00007
DS380-8
© FlexiPanel Ltd
FxPCommand( FxPC_CtlUpdate, ID_List5_5, 0 ); }
pRULong must be rom pointer to 4-byte signed
Patents apply and/or pending
www.FlexiPanel.com

Related parts for TOOTHPIC