NDS3  1.0.0
API reference manual
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
portImpl.h
1 /*
2  * Nominal Device Support v3 (NDS3)
3  *
4  * Copyright (c) 2015 Cosylab d.d.
5  *
6  * For more information about the license please refer to the license.txt
7  * file included in the distribution.
8  */
9 
10 #ifndef NDSPORTIMPL_H
11 #define NDSPORTIMPL_H
12 
13 #include "nds3/impl/nodeImpl.h"
14 
15 namespace nds
16 {
17 
18 class FactoryBaseImpl;
19 class InterfaceBaseImpl;
20 class PVBaseImpl;
21 
22 
29 class PortImpl: public NodeImpl
30 {
31 public:
37  PortImpl(const std::string& name, const nodeType_t nodeType);
38 
39  virtual ~PortImpl();
40 
41  virtual void initialize(FactoryBaseImpl& controlSystem);
42 
43  virtual void deinitialize();
44 
49  virtual std::shared_ptr<PortImpl> getPort();
50 
51 
52  void registerPV(std::shared_ptr<PVBaseImpl> pv);
53 
54  void deregisterPV(std::shared_ptr<PVBaseImpl> pv);
55 
56  template<typename T>
57  void push(std::shared_ptr<PVBaseImpl> pv, const timespec& timestamp, const T& value);
58 
59  virtual std::string buildFullNameFromPort(const FactoryBaseImpl& controlSystem) const;
60  virtual std::string buildFullExternalNameFromPort(const FactoryBaseImpl& controlSystem) const;
61 
62 private:
63  std::unique_ptr<InterfaceBaseImpl> m_pInterface;
64 
65  typedef std::map<int, std::shared_ptr<PVBaseImpl> > tRecords;
66  tRecords m_records;
67 };
68 
69 }
70 #endif // NDSPORTIMPL_H
nodeType_t
Defines the nodes' roles in the tree structure: it is used to build the node's external name when usi...
Definition: definitions.h:103
This is the base class for objects that interact with specific control systems and has to be allocate...
Definition: factoryBaseImpl.h:51
Represents a node (channel or channelGroup in the old NDS) which can contain other nodes...
Definition: nodeImpl.h:29
PortImpl(const std::string &name, const nodeType_t nodeType)
Construct an AsynPort.
virtual std::shared_ptr< PortImpl > getPort()
Return a pointer to this object.
Node that holds an ASYN port.
Definition: portImpl.h:29