Software TSN Switch
A software switch to connect VMs and Containers to a TSN network
Loading...
Searching...
No Matches
GclXmlBuilder.h
Go to the documentation of this file.
1#pragma once
2
3#include <sstream> // For XML construction
4#include <string>
5#include <vector>
6
7#include "CncTypes.h"
8
9namespace cnc {
18 public:
22 GclXmlBuilder() = delete;
23
31 static std::string buildXmlForNode(const CncNode_t& node);
32
39 static std::string buildXmlForInterface(const ietfInterface_t& iface);
40
41 private:
47 static void appendInterfaceXml(std::stringstream& ss, const ietfInterface_t& iface);
48
54 static void appendCycleTime(std::stringstream& ss, const RationalTime_t& time);
55
61 static void appendControlList(std::stringstream& ss, const GclConfig_t& config);
62
69 static void appendPtpTime(std::stringstream& ss, PtpTime_t time, const std::string& tagName);
70};
71} // namespace cnc
Builds Gate Control List (GCL) XML payloads from CNC in-memory data structures.
Definition GclXmlBuilder.h:17
static void appendInterfaceXml(std::stringstream &ss, const ietfInterface_t &iface)
Appends XML for a single interface's GCL configuration.
Definition GclXmlBuilder.cpp:45
static std::string buildXmlForNode(const CncNode_t &node)
Builds XML configuration for the given CncNode_t's GCL. Function iterates over all Interfaces in CncN...
Definition GclXmlBuilder.cpp:16
static void appendCycleTime(std::stringstream &ss, const RationalTime_t &time)
Appends XML for cycle time.
Definition GclXmlBuilder.cpp:90
static void appendPtpTime(std::stringstream &ss, PtpTime_t time, const std::string &tagName)
Appends the ptpTime to the Xml.
Definition GclXmlBuilder.cpp:97
static std::string buildXmlForInterface(const ietfInterface_t &iface)
Builds XML configuration for the given interface GCL. Function that builds the XML structure for the ...
Definition GclXmlBuilder.cpp:37
static void appendControlList(std::stringstream &ss, const GclConfig_t &config)
Appends the Gate Control List to Xml (AdminControlList)
Definition GclXmlBuilder.cpp:104
GclXmlBuilder()=delete
Constructor: Prevents instantiation of this utility class. Just tools.
Definition GclParser.h:10
This struct is used on the CNC side to represent one host with all its interfaces as well as its PTP ...
Definition CncTypes.h:512
Struct to hold information about the gate-parameter-table of an interface, according to the ieee802-d...
Definition CncTypes.h:168
Struct to represent an ieee802:ptp-time-grouping.
Definition CncTypes.h:147
Struct to represent an ieee802:rational-grouping.
Definition CncTypes.h:139
Struct to hold information about an interface, inspired by the ietf-interfaces yang model.
Definition CncTypes.h:256