summaryrefslogtreecommitdiffstats
path: root/veslibrary/ves_cpplibrary/src/lib/encode/XFaultFieldsImp.h
blob: fa55d013990b040dfd7c6c3bbfe4dc8fb734b50c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#pragma once
        
#include "XFaultFields.h"
#include "XInternal.h"

namespace vagt
{
    namespace encode
    {
        class XFaultFieldsImp : public XFaultFields, public XJsonable
        {
        public:
            XFaultFieldsImp(shared_ptr<XCommonEventHeader> header,
                const XString& alarmCondition,
                const XString& specificProblem,
                XEnumFaultFieldsEventSourceType eventSourceType,
                XEnumFaultFieldsEventSeverity eventSeverity,
                XEnumFaultFieldsVfStatus vfStatus);

            virtual std::string toString() override;
            virtual json toJson() override;
            virtual std::shared_ptr<XCommonEventHeader> getCommonHeader() override;

            virtual void setAlarmInterfaceA(const XString& alarmInterfaceA) override;
            virtual void setEventSeverity(XEnumFaultFieldsEventSeverity eventSeverity) override;
            virtual void setAlarmCondition(const XString& alarmCondition) override;
            virtual void setVfStatus(XEnumFaultFieldsVfStatus vfStatus) override;
            virtual void setEventCategory(const XString& eventCategory) override;
            virtual void setEventSourceType(XEnumFaultFieldsEventSourceType eventSourceType) override;
            virtual void setSpecificProblem(const XString& specificProblem) override;
            virtual void setAlarmAdditionalInformation(const XHashMap& alarmAdditionalInformation) override;

        private:
            //required
            shared_ptr<XCommonEventHeader> header_;
            XEnumFaultFieldsEventSeverity eventSeverity_;
            XString alarmCondition_;
            XEnumFaultFieldsVfStatus vfStatus_;
            XEnumFaultFieldsEventSourceType eventSourceType_;
            XString specificProblem_;
            XEnumFaultFieldsFaultFieldsVersion faultFieldsVersion_;
            //optional
            XHashMap alarmAdditionalInformation_;
            std::map<std::string, XCommonValue> comVals_;
        };
    }
}