10 #ifndef _SESSION_DEFINITONS_H_
11 #define _SESSION_DEFINITONS_H_
18 #include <sag_connectivity_plugins.hpp>
22 #define SESSION_CONFIG_SCHEMA ("configSchema")
23 #define SESSION_CONFIG_PARAMS ("SCP")
24 #define SESSION_CONFIG_KEY ("SessionConfigParams")
25 #define SESSION_CAPABILITIES ("sessionCapabilities")
26 #define CTRL_PARAMS ("CtrlParams")
27 #define CTRL_PARAMS_CP ("CP")
28 #define CTRL_PARAMS_SCHEMA ("CtrlParamsSchema")
60 const std::string& paramName,
61 const std::string& type,
62 const std::string& defaultVal,
63 std::list<std::string>& allowedVals,
64 const std::string& description,
69 , m_defaultVal(defaultVal)
70 , m_description(description)
71 , m_required(required)
72 , m_allowedVals(allowedVals)
73 , m_referenceOnly(referenceOnly)
85 std::stringstream listToString;
86 std::copy(m_allowedVals.begin(), m_allowedVals.end(), std::ostream_iterator<std::string>(listToString,
","));
89 ss <<
"type=" << m_type <<
" ,defaultVal=" << m_defaultVal
90 <<
" ,description=" << m_description <<
" ,required="
91 << m_required <<
" ,allowedVals=[" << listToString.str()
92 <<
"] ,referenceOnly=" << m_referenceOnly << std::endl;
94 return std::move(ss.str());
104 map_t getCP(
const std::string& eventType)
const;
135 const std::string& paramName,
136 const std::string& type,
137 const std::string& defaultVal,
138 std::list<std::string>& allowedVals,
139 const std::string& description,
143 :
Param(paramName, type, defaultVal, allowedVals, description, required, referenceOnly)
182 map_t getConfigSchemaString()
const;
185 typedef std::map<std::string, SessionParam>
Map;
197 std::stringstream mapToString;
198 for (
auto it=m_map.begin(); it!=m_map.end();++it)
200 mapToString << it->first <<
":" << it->second.toString();
202 return std::move(mapToString.str());
223 std::string paramName,
225 std::string defaultVal,
226 std::list<std::string>& allowedVals,
227 std::string description,
230 :
Param(paramName, type, defaultVal, allowedVals, description, required,
false)
265 map_t getCPSchema()
const;
268 typedef std::map<std::string, CapabilityParam>
Map;
280 std::stringstream mapToString;
281 for (
auto it = m_map.begin(); it != m_map.end(); ++it)
283 mapToString << it->first <<
":" << it->second.toString();
285 return std::move(mapToString.str());
311 const std::string streamName,
314 : streamName_(streamName), capability_(capability)
323 std::string streamName_;
350 std::string transportName,
351 std::string sessionName,
352 std::string channelName,
353 std::string description
355 : m_transportName(transportName)
356 , m_sessionName(sessionName)
357 , m_channelName(channelName)
358 , m_description(description)
362 std::stringstream ss;
363 ss <<
"CONNECTION_" << sessionName;
364 m_connectionID = ss.str();
376 std::stringstream ss;
377 ss <<
"sourceId=" << m_sourceId <<
", transportName=" << m_transportName <<
", sessionName="
378 << m_sessionName <<
", channelName=" << m_channelName <<
", state=" << (int)m_state
379 <<
", connectionID=" << m_connectionID <<
", generationId=" << m_generationId <<
" ,SessionParams=" << m_sessionParams.toString();
380 return std::move(ss.str());
386 map_t getCapabilitiesString()
const;
std::map< std::string, SessionParam > Map
Definition: Connectivity_SessionDefs.h:185
std::string m_description
Definition: Connectivity_SessionDefs.h:392
SessionConfigs(std::string transportName, std::string sessionName, std::string channelName, std::string description)
Definition: Connectivity_SessionDefs.h:349
Definition: Connectivity_SessionDefs.h:120
bool m_required
Definition: Connectivity_SessionDefs.h:111
bool m_referenceOnly
Definition: Connectivity_SessionDefs.h:112
const std::string toString()
Definition: Connectivity_SessionDefs.h:374
std::string m_sessionName
Definition: Connectivity_SessionDefs.h:390
AP_SESSION_State
Definition: Connectivity_SessionDefs.h:31
Capabilities m_capabilitiesMap
Definition: Connectivity_SessionDefs.h:397
Definition: Connectivity_SessionDefs.h:208
std::string m_generationId
Definition: Connectivity_SessionDefs.h:395
Definition: Connectivity_SessionDefs.h:34
const std::string toString()
Definition: Connectivity_SessionDefs.h:83
std::string m_description
Definition: Connectivity_SessionDefs.h:110
std::string m_transportName
Definition: Connectivity_SessionDefs.h:389
Definition: Connectivity_SessionDefs.h:40
const std::string toString()
Definition: Connectivity_SessionDefs.h:195
SessionParam(const std::string ¶mName, const std::string &type, const std::string &defaultVal, std::list< std::string > &allowedVals, const std::string &description, bool required, bool referenceOnly)
Definition: Connectivity_SessionDefs.h:134
Definition: Connectivity_SessionDefs.h:39
CapabilityParam()
Definition: Connectivity_SessionDefs.h:214
Map m_map
Definition: Connectivity_SessionDefs.h:273
std::string m_channelName
Definition: Connectivity_SessionDefs.h:391
Capability()
Definition: Connectivity_SessionDefs.h:302
CapabilityParams()
Definition: Connectivity_SessionDefs.h:253
AP_SESSION_State m_state
Definition: Connectivity_SessionDefs.h:393
Definition: Connectivity_SessionDefs.h:248
std::string m_defaultVal
Definition: Connectivity_SessionDefs.h:108
SessionParams m_sessionParams
Definition: Connectivity_SessionDefs.h:396
Definition: Connectivity_SessionDefs.h:164
std::string m_name
Definition: Connectivity_SessionDefs.h:106
Definition: Connectivity_SessionDefs.h:298
Definition: Connectivity_SessionDefs.h:38
std::string m_type
Definition: Connectivity_SessionDefs.h:107
Param()
Definition: Connectivity_SessionDefs.h:52
Definition: Connectivity_SessionDefs.h:37
SessionParams()
Definition: Connectivity_SessionDefs.h:170
Definition: Connectivity_SessionDefs.h:48
const std::string toString()
Definition: Connectivity_SessionDefs.h:278
int64_t m_sourceId
Definition: Connectivity_SessionDefs.h:388
Definition: Connectivity_SessionDefs.h:335
Definition: Connectivity_SessionDefs.h:36
std::list< std::string > m_allowedVals
Definition: Connectivity_SessionDefs.h:109
std::map< std::string, CapabilityParams > Capabilities
Definition: Connectivity_SessionDefs.h:290
Definition: Connectivity_SessionDefs.h:35
SessionConfigs()
Definition: Connectivity_SessionDefs.h:340
SessionParam()
Definition: Connectivity_SessionDefs.h:126
CapabilityParam capability_
Definition: Connectivity_SessionDefs.h:327
std::string m_connectionID
Definition: Connectivity_SessionDefs.h:394
Param(const std::string ¶mName, const std::string &type, const std::string &defaultVal, std::list< std::string > &allowedVals, const std::string &description, bool required, bool referenceOnly)
Definition: Connectivity_SessionDefs.h:59
std::map< std::string, CapabilityParam > Map
Definition: Connectivity_SessionDefs.h:268
Map m_map
Definition: Connectivity_SessionDefs.h:190