24#ifndef _CONNECTIONPARAMS_H__
25#define _CONNECTIONPARAMS_H__
29#ifndef __DSPORTTYPE_H__
30#include <dsPortType.h>
36#include <wx/dynarray.h>
40#include "comm_navmsg.h"
62typedef enum { WHITELIST = 0, BLACKLIST = 1 } ListType;
64typedef 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;
103 ListType InputSentenceListType;
104 wxArrayString InputSentenceList;
105 ListType OutputSentenceListType;
106 wxArrayString OutputSentenceList;
109 wxString UserComment;
111 wxString Serialize()
const;
112 void Deserialize(
const wxString &configStr);
114 wxString GetSourceTypeStr()
const;
115 wxString GetAddressStr()
const;
116 wxString GetParametersStr()
const;
117 wxString GetIOTypeValueStr()
const;
118 wxString GetFiltersStr()
const;
119 wxString GetDSPort()
const;
120 std::string GetLastDSPort()
const;
121 NavAddr::Bus GetLastCommProtocol();
122 wxString GetPortStr()
const {
return Port; }
123 void SetPortStr(wxString str) { Port = str; }
124 std::string GetStrippedDSPort();
125 NavAddr::Bus GetCommProtocol();
127 bool SentencePassesFilter(
const wxString& sentence, FilterDirection direction);
134 wxString FilterTypeToStr(ListType type, FilterDirection dir)
const;
139wxArrayOfConnPrm* TheConnectionParams();