libptpmgmt  1.4
libptpmgmt library that provides the functionality of linuxptp pmc
vecDef.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: LGPL-3.0-or-later
2  SPDX-FileCopyrightText: Copyright © 2022 Erez Geva <ErezGeva2@gmail.com> */
3 
24 #ifndef __PTPMGMT_VEC_DEF_H
25 #define __PTPMGMT_VEC_DEF_H
26 
27 #include "proc.h"
28 #include "sig.h"
29 
30 __PTPMGMT_NAMESPACE_BEGIN
31 
36 {
37  private:
38  std::vector<FaultRecord_t> elements;
39  public:
63  FaultRecord_v(size_t size, const FaultRecord_t &value);
71  FaultRecord_v(const FaultRecord_v &container);
77  size_t size() const;
85  bool empty() const;
91  void clear();
99  void push(const FaultRecord_t &value);
115  void pop_back();
137  FaultRecord_t &get(size_t position) const;
147  void set(size_t position, FaultRecord_t &value);
159  FaultRecord_t &operator[](size_t position);
165  size_t capacity() const;
171  void reserve(size_t new_cap);
176  size_t max_size() const;
177 };
182 {
183  private:
184  std::vector<ClockIdentity_t> elements;
185  public:
209  ClockIdentity_v(size_t size, const ClockIdentity_t &value);
217  ClockIdentity_v(const ClockIdentity_v &container);
223  size_t size() const;
231  bool empty() const;
237  void clear();
245  void push(const ClockIdentity_t &value);
261  void pop_back();
283  ClockIdentity_t &get(size_t position) const;
293  void set(size_t position, ClockIdentity_t &value);
305  ClockIdentity_t &operator[](size_t position);
311  size_t capacity() const;
317  void reserve(size_t new_cap);
322  size_t max_size() const;
323 };
328 {
329  private:
330  std::vector<PortAddress_t> elements;
331  public:
355  PortAddress_v(size_t size, const PortAddress_t &value);
363  PortAddress_v(const PortAddress_v &container);
369  size_t size() const;
377  bool empty() const;
383  void clear();
391  void push(const PortAddress_t &value);
407  void pop_back();
429  PortAddress_t &get(size_t position) const;
439  void set(size_t position, PortAddress_t &value);
451  PortAddress_t &operator[](size_t position);
457  size_t capacity() const;
463  void reserve(size_t new_cap);
468  size_t max_size() const;
469 };
474 {
475  private:
476  std::vector<AcceptableMaster_t> elements;
477  public:
515  size_t size() const;
523  bool empty() const;
529  void clear();
537  void push(const AcceptableMaster_t &value);
553  void pop_back();
575  AcceptableMaster_t &get(size_t position) const;
585  void set(size_t position, AcceptableMaster_t &value);
597  AcceptableMaster_t &operator[](size_t position);
603  size_t capacity() const;
609  void reserve(size_t new_cap);
614  size_t max_size() const;
615 };
620 {
621  private:
622  std::vector<LinuxptpUnicastMaster_t> elements;
623  public:
661  size_t size() const;
669  bool empty() const;
675  void clear();
683  void push(const LinuxptpUnicastMaster_t &value);
699  void pop_back();
721  LinuxptpUnicastMaster_t &get(size_t position) const;
731  void set(size_t position, LinuxptpUnicastMaster_t &value);
749  size_t capacity() const;
755  void reserve(size_t new_cap);
760  size_t max_size() const;
761 };
766 {
767  private:
768  std::vector<PtpEvent_t> elements;
769  public:
785  PtpEvent_v(size_t size);
793  PtpEvent_v(size_t size, const PtpEvent_t &value);
801  PtpEvent_v(const PtpEvent_v &container);
807  size_t size() const;
815  bool empty() const;
821  void clear();
829  void push(const PtpEvent_t &value);
845  void pop_back();
867  PtpEvent_t &get(size_t position) const;
877  void set(size_t position, PtpEvent_t &value);
889  PtpEvent_t &operator[](size_t position);
895  size_t capacity() const;
901  void reserve(size_t new_cap);
906  size_t max_size() const;
907 };
912 {
913  private:
914  std::vector<PtpSample_t> elements;
915  public:
931  PtpSample_v(size_t size);
939  PtpSample_v(size_t size, const PtpSample_t &value);
947  PtpSample_v(const PtpSample_v &container);
953  size_t size() const;
961  bool empty() const;
967  void clear();
975  void push(const PtpSample_t &value);
991  void pop_back();
1013  PtpSample_t &get(size_t position) const;
1023  void set(size_t position, PtpSample_t &value);
1035  PtpSample_t &operator[](size_t position);
1041  size_t capacity() const;
1047  void reserve(size_t new_cap);
1052  size_t max_size() const;
1053 };
1058 {
1059  private:
1060  std::vector<PtpSampleExt_t> elements;
1061  public:
1085  PtpSampleExt_v(size_t size, const PtpSampleExt_t &value);
1093  PtpSampleExt_v(const PtpSampleExt_v &container);
1099  size_t size() const;
1107  bool empty() const;
1113  void clear();
1121  void push(const PtpSampleExt_t &value);
1137  void pop_back();
1159  PtpSampleExt_t &get(size_t position) const;
1169  void set(size_t position, PtpSampleExt_t &value);
1181  PtpSampleExt_t &operator[](size_t position);
1187  size_t capacity() const;
1193  void reserve(size_t new_cap);
1198  size_t max_size() const;
1199 };
1203 class SigTime
1204 {
1205  private:
1206  std::vector<SLAVE_RX_SYNC_TIMING_DATA_rec_t> elements;
1207  public:
1223  SigTime(size_t size);
1239  SigTime(const SigTime &container);
1245  size_t size() const;
1253  bool empty() const;
1259  void clear();
1283  void pop_back();
1305  SLAVE_RX_SYNC_TIMING_DATA_rec_t &get(size_t position) const;
1315  void set(size_t position, SLAVE_RX_SYNC_TIMING_DATA_rec_t &value);
1333  size_t capacity() const;
1339  void reserve(size_t new_cap);
1344  size_t max_size() const;
1345 };
1349 class SigComp
1350 {
1351  private:
1352  std::vector<SLAVE_RX_SYNC_COMPUTED_DATA_rec_t> elements;
1353  public:
1369  SigComp(size_t size);
1385  SigComp(const SigComp &container);
1391  size_t size() const;
1399  bool empty() const;
1405  void clear();
1429  void pop_back();
1451  SLAVE_RX_SYNC_COMPUTED_DATA_rec_t &get(size_t position) const;
1461  void set(size_t position, SLAVE_RX_SYNC_COMPUTED_DATA_rec_t &value);
1479  size_t capacity() const;
1485  void reserve(size_t new_cap);
1490  size_t max_size() const;
1491 };
1496 {
1497  private:
1498  std::vector<SLAVE_TX_EVENT_TIMESTAMPS_rec_t> elements;
1499  public:
1515  SigEvent(size_t size);
1531  SigEvent(const SigEvent &container);
1537  size_t size() const;
1545  bool empty() const;
1551  void clear();
1575  void pop_back();
1597  SLAVE_TX_EVENT_TIMESTAMPS_rec_t &get(size_t position) const;
1607  void set(size_t position, SLAVE_TX_EVENT_TIMESTAMPS_rec_t &value);
1625  size_t capacity() const;
1631  void reserve(size_t new_cap);
1636  size_t max_size() const;
1637 };
1642 {
1643  private:
1644  std::vector<SLAVE_DELAY_TIMING_DATA_NP_rec_t> elements;
1645  public:
1661  SigDelay(size_t size);
1677  SigDelay(const SigDelay &container);
1683  size_t size() const;
1691  bool empty() const;
1697  void clear();
1721  void pop_back();
1743  SLAVE_DELAY_TIMING_DATA_NP_rec_t &get(size_t position) const;
1753  void set(size_t position, SLAVE_DELAY_TIMING_DATA_NP_rec_t &value);
1771  size_t capacity() const;
1777  void reserve(size_t new_cap);
1782  size_t max_size() const;
1783 };
1784 
1785 __PTPMGMT_NAMESPACE_END
1786 
1787 #endif /* __PTPMGMT_VEC_DEF_H */
Definition: vecDef.h:474
AcceptableMaster_t back()
AcceptableMaster_v(size_t size)
void set(size_t position, AcceptableMaster_t &value)
size_t capacity() const
AcceptableMaster_v(size_t size, const AcceptableMaster_t &value)
AcceptableMaster_t front()
size_t size() const
bool empty() const
AcceptableMaster_t & operator[](size_t position)
AcceptableMaster_t & get(size_t position) const
void push(const AcceptableMaster_t &value)
size_t max_size() const
AcceptableMaster_v(const AcceptableMaster_v &container)
void reserve(size_t new_cap)
AcceptableMaster_t pop()
Definition: vecDef.h:182
ClockIdentity_v(size_t size)
bool empty() const
ClockIdentity_t pop()
void reserve(size_t new_cap)
void set(size_t position, ClockIdentity_t &value)
ClockIdentity_v(const ClockIdentity_v &container)
size_t size() const
ClockIdentity_t & get(size_t position) const
size_t capacity() const
void push(const ClockIdentity_t &value)
ClockIdentity_t back()
ClockIdentity_t & operator[](size_t position)
ClockIdentity_t front()
ClockIdentity_v(size_t size, const ClockIdentity_t &value)
size_t max_size() const
Definition: vecDef.h:36
FaultRecord_t front()
FaultRecord_v(size_t size)
FaultRecord_v(const FaultRecord_v &container)
size_t size() const
void set(size_t position, FaultRecord_t &value)
FaultRecord_v(size_t size, const FaultRecord_t &value)
size_t max_size() const
FaultRecord_t pop()
void reserve(size_t new_cap)
size_t capacity() const
void push(const FaultRecord_t &value)
FaultRecord_t & operator[](size_t position)
FaultRecord_t & get(size_t position) const
FaultRecord_t back()
bool empty() const
Definition: vecDef.h:620
LinuxptpUnicastMaster_t front()
size_t max_size() const
LinuxptpUnicastMaster_v(size_t size, const LinuxptpUnicastMaster_t &value)
void set(size_t position, LinuxptpUnicastMaster_t &value)
LinuxptpUnicastMaster_t & get(size_t position) const
LinuxptpUnicastMaster_v(const LinuxptpUnicastMaster_v &container)
LinuxptpUnicastMaster_t pop()
size_t capacity() const
void reserve(size_t new_cap)
LinuxptpUnicastMaster_t back()
LinuxptpUnicastMaster_v(size_t size)
void push(const LinuxptpUnicastMaster_t &value)
LinuxptpUnicastMaster_t & operator[](size_t position)
Definition: vecDef.h:328
PortAddress_v(const PortAddress_v &container)
void set(size_t position, PortAddress_t &value)
PortAddress_t & operator[](size_t position)
PortAddress_t & get(size_t position) const
void reserve(size_t new_cap)
bool empty() const
PortAddress_t pop()
size_t max_size() const
PortAddress_t back()
size_t capacity() const
PortAddress_v(size_t size)
void push(const PortAddress_t &value)
size_t size() const
PortAddress_v(size_t size, const PortAddress_t &value)
PortAddress_t front()
Definition: vecDef.h:766
PtpEvent_t & get(size_t position) const
PtpEvent_t & operator[](size_t position)
void clear()
PtpEvent_v(const PtpEvent_v &container)
PtpEvent_t front()
PtpEvent_v(size_t size)
bool empty() const
PtpEvent_t pop()
size_t capacity() const
void reserve(size_t new_cap)
size_t max_size() const
void pop_back()
void set(size_t position, PtpEvent_t &value)
PtpEvent_t back()
size_t size() const
PtpEvent_v(size_t size, const PtpEvent_t &value)
void push(const PtpEvent_t &value)
Definition: vecDef.h:1058
PtpSampleExt_v(const PtpSampleExt_v &container)
PtpSampleExt_v(size_t size, const PtpSampleExt_t &value)
PtpSampleExt_t front()
PtpSampleExt_t & operator[](size_t position)
void reserve(size_t new_cap)
PtpSampleExt_t back()
PtpSampleExt_t pop()
PtpSampleExt_t & get(size_t position) const
size_t size() const
PtpSampleExt_v(size_t size)
size_t max_size() const
void set(size_t position, PtpSampleExt_t &value)
bool empty() const
void push(const PtpSampleExt_t &value)
size_t capacity() const
Definition: vecDef.h:912
void pop_back()
PtpSample_t & operator[](size_t position)
bool empty() const
size_t capacity() const
PtpSample_t front()
PtpSample_t & get(size_t position) const
size_t max_size() const
PtpSample_v(size_t size)
PtpSample_t pop()
PtpSample_t back()
void set(size_t position, PtpSample_t &value)
PtpSample_v(size_t size, const PtpSample_t &value)
void clear()
size_t size() const
void reserve(size_t new_cap)
void push(const PtpSample_t &value)
PtpSample_v(const PtpSample_v &container)
Definition: vecDef.h:1350
SLAVE_RX_SYNC_COMPUTED_DATA_rec_t & get(size_t position) const
void reserve(size_t new_cap)
bool empty() const
size_t size() const
SLAVE_RX_SYNC_COMPUTED_DATA_rec_t & operator[](size_t position)
SigComp(size_t size)
void pop_back()
SigComp(size_t size, const SLAVE_RX_SYNC_COMPUTED_DATA_rec_t &value)
void push(const SLAVE_RX_SYNC_COMPUTED_DATA_rec_t &value)
SigComp(const SigComp &container)
SLAVE_RX_SYNC_COMPUTED_DATA_rec_t back()
SLAVE_RX_SYNC_COMPUTED_DATA_rec_t pop()
void set(size_t position, SLAVE_RX_SYNC_COMPUTED_DATA_rec_t &value)
size_t max_size() const
size_t capacity() const
SLAVE_RX_SYNC_COMPUTED_DATA_rec_t front()
void clear()
Definition: vecDef.h:1642
void set(size_t position, SLAVE_DELAY_TIMING_DATA_NP_rec_t &value)
SigDelay(const SigDelay &container)
bool empty() const
SLAVE_DELAY_TIMING_DATA_NP_rec_t back()
SLAVE_DELAY_TIMING_DATA_NP_rec_t & operator[](size_t position)
void clear()
void push(const SLAVE_DELAY_TIMING_DATA_NP_rec_t &value)
SLAVE_DELAY_TIMING_DATA_NP_rec_t front()
SigDelay(size_t size)
SigDelay(size_t size, const SLAVE_DELAY_TIMING_DATA_NP_rec_t &value)
SLAVE_DELAY_TIMING_DATA_NP_rec_t pop()
void pop_back()
void reserve(size_t new_cap)
SLAVE_DELAY_TIMING_DATA_NP_rec_t & get(size_t position) const
size_t max_size() const
size_t size() const
size_t capacity() const
Definition: vecDef.h:1496
size_t capacity() const
SLAVE_TX_EVENT_TIMESTAMPS_rec_t & get(size_t position) const
SLAVE_TX_EVENT_TIMESTAMPS_rec_t pop()
size_t size() const
void set(size_t position, SLAVE_TX_EVENT_TIMESTAMPS_rec_t &value)
SigEvent(const SigEvent &container)
SigEvent(size_t size)
void push(const SLAVE_TX_EVENT_TIMESTAMPS_rec_t &value)
SLAVE_TX_EVENT_TIMESTAMPS_rec_t & operator[](size_t position)
SigEvent(size_t size, const SLAVE_TX_EVENT_TIMESTAMPS_rec_t &value)
SLAVE_TX_EVENT_TIMESTAMPS_rec_t front()
void reserve(size_t new_cap)
void clear()
size_t max_size() const
SLAVE_TX_EVENT_TIMESTAMPS_rec_t back()
bool empty() const
void pop_back()
Definition: vecDef.h:1204
SLAVE_RX_SYNC_TIMING_DATA_rec_t pop()
void pop_back()
SLAVE_RX_SYNC_TIMING_DATA_rec_t & operator[](size_t position)
bool empty() const
size_t max_size() const
void clear()
void push(const SLAVE_RX_SYNC_TIMING_DATA_rec_t &value)
SigTime(size_t size)
SigTime(const SigTime &container)
void reserve(size_t new_cap)
size_t size() const
size_t capacity() const
SLAVE_RX_SYNC_TIMING_DATA_rec_t front()
SigTime(size_t size, const SLAVE_RX_SYNC_TIMING_DATA_rec_t &value)
SLAVE_RX_SYNC_TIMING_DATA_rec_t & get(size_t position) const
void set(size_t position, SLAVE_RX_SYNC_TIMING_DATA_rec_t &value)
SLAVE_RX_SYNC_TIMING_DATA_rec_t back()
Definition: types.h:866
Definition: types.h:655
Definition: types.h:849
Definition: types.h:970
Definition: types.h:762
Definition: ptp.h:181
Definition: ptp.h:195
Definition: ptp.h:188
Definition: sig.h:140
Definition: sig.h:202