16 #if( FMI_SUPPORT_A617 ) 32 , m_recordInHistory(FALSE)
37 , m_description(_T(""))
38 , m_descriptionLength(0)
49 CDialog::DoDataExchange(pDX);
104 CDialog::OnInitDialog();
106 (( CSpinButtonCtrl*) GetDlgItem(
IDC_SPIN1 ) )->SetRange( 1, 65535/2 );
107 (( CSpinButtonCtrl*) GetDlgItem(
IDC_SPIN2 ) )->SetRange( 1, 256 );
119 int selectedIndex = lb->GetCurSel();
120 int topIndex = lb->GetTopIndex();
124 std::map<uint8,uint32>::const_iterator it =
mSensorList.mSensorIndexInList.begin();
125 for( it; it !=
mSensorList.mSensorIndexInList.end(); it++ )
129 lb->AddString( ( LPCTSTR(
mSensorList.mSensors.get( it->second ).getCurrentName() ) ) );
133 if( selectedIndex == -1 )
138 std::map<uint8,uint32>::const_iterator it =
mSensorList.mSensorIndexInList.begin();
139 for(
int i = 0; i < selectedIndex; i++ )
158 s.Format(_T(
"%d"), strlen( item.
getStatus() ));
169 lb->SetCurSel( selectedIndex );
170 lb->SetTopIndex( topIndex );
184 memset( &config, 0,
sizeof( config ) );
192 config.
name[
sizeof( config.
name ) - 1] =
'\0';
212 memset( &update, 0,
sizeof( update ) );
231 mSensorList.mSensors.get( iter->first ).setUpdate( update );
242 memset( &message, 0,
sizeof( message ) );
262 char text[
sizeof( message.
name ) ];
264 text[
sizeof( text ) - 1] =
'\0';
279 char text[
sizeof( message.
status ) ];
281 text[
sizeof( text ) - 1] =
'\0';
298 text[
sizeof( text ) - 1] =
'\0';
virtual ~CSendSensorDlg()
boolean getPlaySound() const
Get the play sound setting.
uint32 getNumUpdates() const
Get the number of updates submitted.
void setId(const key_type &aId)
Set item's ID.
afx_msg void RefreshList()
#define IDC_SENSOR_PLAY_SOUND
void reset()
reset the form to defaults (since this dialog is long-lived)
Data type for Update Sensor Request Packet ID (0x1406) from server to client.
boolean getRecordSensor() const
Get the record sensor setting.
#define IDC_SENSOR_DESCR_LENGTH
#define IDC_SENSOR_NAME_LENGTH
#define IDC_SENSOR_STATUS
CString getCurrentName() const
Get the current name of this item.
void sendFmiPacket(uint16 aFmiPacketId, uint8 *aFmiPayload, uint8 aFmiPayloadSize)
Send an arbitrary FMI packet.
#define IDC_SENSOR_RECORD_IN_HISTORY
Data structure to hold details of an A617 sensor that the server needs to keep.
#define IDC_SENSOR_SEVERITY
void setValid(BOOL aValid=TRUE)
Set this item as valid.
#define IDC_SENSOR_STATUS_LENGTH
codepage_type mClientCodepage
Code page used for encoding of text fields when communicating with the client.
afx_msg void OnEnChangeSensorDescription()
Update the description length label in response to change in description.
afx_msg void OnBnClickedDelete()
void setCurrentName(CString aName)
Set the current name of the sensor.
Data type for Delete Sensor Request Packet ID (0x1404) from server to client.
Serial communication controller for Garmin and FMI packets.
FmiApplicationLayer & mCom
Reference to the FMI communication controller.
uint8 getDisplayIndex() const
Get display index.
afx_msg void OnBnClickedCreate()
Validate form, build and send appropriate FMI packet to device.
afx_msg void OnEnChangeSensorStatus()
Update the status length label in response to change in status.
Map whose contents are also saved to a file.
unsigned char uint8
8-bit unsigned integer
uint32 getUniqueId() const
Get the unique id.
uint8 getSeverity() const
Get the severity.
afx_msg void OnEnChangeSensorName()
Update the name length label in response to change in name.
#define IDC_SENSOR_UNIQUE_ID
afx_msg void OnBnClickedUpdate()
#define IDC_SENSOR_DESCRIPTION
BOOL OnInitDialog()
This function is called when the window is created.
Form for sending A617 sensor popups to the device.
Data type for Configure Sensor Request Packet ID (0x1402) from server to client.
const char * getStatus() const
Get the status.
uint16 getIcon() const
Get icon.
void setConfig(fmi_sensor_config_request aConfig)
Set the sensor.
void setParent(FileBackedMap< SensorListItem > *aParent)
Set the parent.
const char * getDescription() const
Get the description.
#define IDC_SENSOR_SORT_ORDER
virtual void DoDataExchange(CDataExchange *pDX)