24 #ifndef _CONNECTIONPARAMS_H__
25 #define _CONNECTIONPARAMS_H__
27 #include <wx/wxprec.h>
29 #ifndef __DSPORTTYPE_H__
30 #include "model/ds_porttype.h"
35 #include <wx/arrstr.h>
36 #include <wx/dynarray.h>
37 #include <wx/string.h>
40 #include "model/comm_navmsg.h"
62 typedef enum { WHITELIST = 0, BLACKLIST = 1 } ListType;
64 typedef enum { FILTER_INPUT = 0, FILTER_OUTPUT = 1 } FilterDirection;
72 #define CONN_ENABLE_ID 47621
84 NetworkProtocol NetProtocol;
85 wxString NetworkAddress;
88 wxString LastNetworkAddress;
90 NetworkProtocol LastNetProtocol;
91 DataProtocol LastDataProtocol;
93 DataProtocol Protocol;
95 wxString socketCAN_port;
105 ListType InputSentenceListType;
106 wxArrayString InputSentenceList;
107 ListType OutputSentenceListType;
108 wxArrayString OutputSentenceList;
111 wxString UserComment;
114 wxString Serialize()
const;
115 void Deserialize(
const wxString &configStr);
117 wxString GetSourceTypeStr()
const;
118 wxString GetAddressStr()
const;
119 wxString GetParametersStr()
const;
120 wxString GetIOTypeValueStr()
const;
121 wxString GetFiltersStr()
const;
122 wxString GetDSPort()
const;
123 std::string GetLastDSPort()
const;
124 NavAddr::Bus GetLastCommProtocol();
125 wxString GetPortStr()
const {
return Port; }
126 void SetPortStr(wxString str) { Port = str; }
127 std::string GetStrippedDSPort();
128 NavAddr::Bus GetCommProtocol();
130 bool SentencePassesFilter(
const wxString& sentence, FilterDirection direction);
137 wxString FilterTypeToStr(ListType type, FilterDirection dir)
const;
142 wxArrayOfConnPrm* TheConnectionParams();