ADTF  3.13.2
service.h
Go to the documentation of this file.
1 
7 #ifndef _UCOM_SERVICE_CLASS_HEADER_
8 #define _UCOM_SERVICE_CLASS_HEADER_
9 
10 namespace adtf
11 {
12 namespace ucom
13 {
14 namespace ant
15 {
16 
17 class DOEXPORT cServiceLevelmachine : public level_machine < cServiceLevelmachine,
18  ucom::IService::tServiceState,
19  ucom::IService::tServiceState::Deinitialized >
20 {
21 
22 friend class cService;
23 
24 protected:
25  cServiceLevelmachine() = default;
28  cServiceLevelmachine& operator=(const cServiceLevelmachine&) = delete;
29  cServiceLevelmachine& operator=(cServiceLevelmachine&&) = delete;
30 
31 
32 
33 protected:
41  virtual tResult ServiceInit();
42 
51  virtual tResult ServiceShutdown();
52 
53 };
54 
55 class DOEXPORT cService : public catwo::object<cServiceLevelmachine, IClassInfo, IObjectInfo, IService>
56 {
57 private:
58  std::vector<IEventSink*> m_oEventSinks;
59 
60 public:
61  ADTF_OBJECT_INFO_IMPL(m_strOID);
63  ADTF_CLASS_ID(cService, "nocid_set");
64 
65 public:
67 
68  tServiceState GetState() const override;
69 
70  tResult SetState(tServiceState eState) override;
71 
72  tResult ServiceEvent(tInt nEventId,
73  tUInt32 ui32Param1 = 0,
74  tUInt32 ui32Param2 = 0,
75  tVoid* pvData = nullptr,
76  tInt szData = 0) override;
77 };
78 
79 
80 }//ns ant
81 
82 
83 using ant::cService;
84 
85 
86 }//ns ucom
87 }//ns adtf
88 
89 #endif // _UCOM_SERVICE_CLASS_HEADER_
The IService interface provides defines methods for system services.
Definition: service_intf.h:23
#define ADTF_CLASS_INFO_IMPL(_class)
Common macro to implement correct treatment of adtf::ucom::ant::IClassInfo.
Definition: class_id.h:57
A common result class usable as return value throughout.
Definition: result.h:23
Namespace for entire ADTF SDK.
uint32_t tUInt32
type definition for unsigned integer values (32bit) (platform and compiler independent type)...
Base class for every interface type within the uCOM.
Definition: object_intf.h:30
#define ADTF_CLASS_ID(_class, _strcid)
ADTF_CLASS_INFO_IMPL.
Definition: class_id.h:91
Use this template if you want to implement an ucom::ant::IObject based Interface and/or subclass an ...
Definition: object.h:357
#define UCOM_RESOLVE(...)
Resolve a path to a base class which is inherited multiple times.
Definition: adtf_iid.h:40
Generator template to create a Basic Level Machine implmentation.
Definition: level_machine.h:25

Copyright © Audi Electronics Venture GmbH. All rights reserved. (Generated on Tue Nov 16 2021 by doxygen 1.8.14)