Now you can download a copy of these docs so you can use them offline! Download now
DoubleEntry.cpp
00001 /*----------------------------------------------------------------------------*/ 00002 /* Copyright (c) FIRST 2011. All Rights Reserved. */ 00003 /* Open Source Software - may be modified and shared by FRC teams. The code */ 00004 /* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */ 00005 /*----------------------------------------------------------------------------*/ 00006 00007 #include "NetworkTables/DoubleEntry.h" 00008 #include "NetworkTables/Buffer.h" 00009 00010 namespace NetworkTables 00011 { 00012 00013 DoubleEntry::DoubleEntry(double value) : 00014 m_value(value) 00015 { 00016 } 00017 00018 NetworkTables_Types DoubleEntry::GetType() 00019 { 00020 return kNetworkTables_Types_DOUBLE; 00021 } 00022 00023 void DoubleEntry::Encode(Buffer *buffer) 00024 { 00025 Entry::Encode(buffer); 00026 buffer->WriteByte(kNetworkTables_DOUBLE); 00027 buffer->WriteDouble(m_value); 00028 } 00029 00030 double DoubleEntry::GetDouble() 00031 { 00032 return m_value; 00033 } 00034 00035 } // namespace
Generated on Thu Jan 12 2012 22:35:19 for WPILibC++ by
1.7.1