Now you can download a copy of these docs so you can use them offline! Download now
NumberArray.cpp
1 /*
2  * NumberArray.cpp
3  *
4  * Created on: Nov 16, 2012
5  * Author: Mitchell Wills
6  */
7 
8 #include "networktables2/type/NumberArray.h"
9 #include "networktables2/type/DefaultEntryTypes.h"
10 
11 
12 const TypeId NumberArray::NUMBER_ARRAY_RAW_ID = 0x11;
13 ArrayEntryType NumberArray::TYPE(NUMBER_ARRAY_RAW_ID, DefaultEntryTypes::DOUBLE);
14 
15 NumberArray::NumberArray() : ArrayData(TYPE) {
16 }
17 
18 double NumberArray::get(int index){
19  return _get(index).f;
20 }
21 
22 void NumberArray::set(int index, double value){
23  EntryValue eValue;
24  eValue.f = value;
25  _set(index, eValue);
26 }
27 
28 void NumberArray::add(double value){
29  EntryValue eValue;
30  eValue.f = value;
31  _add(eValue);
32 }
EntryValue _get(unsigned int index)
Definition: ArrayData.cpp:25
void _set(unsigned int index, EntryValue value)
Definition: ArrayData.cpp:29
void _add(EntryValue value)
Definition: ArrayData.cpp:34
Definition: ITable.h:13

Generated on Sat Apr 26 2014 12:26:45 for WPILibC++ by doxygen 1.8.6