Free Electron
drivelineAS.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __driveline_drivelineAS_h__
8 #define __driveline_drivelineAS_h__
9 
10 namespace fe
11 {
12 namespace ext
13 {
14 
15 /// @brief Driveline Model
17  : public AsNamed, public Initialize<AsDrivelineModel>
18 {
19  public:
20  AsConstruct(AsDrivelineModel);
21  void initialize(void)
22  {
23  add(component, FE_USE("driveline:component"));
24  }
25  Accessor<String> component;
26 };
27 
28 /// @brief Driveline Shaft
29 class AsShaft
30  : public AccessorSet, public Initialize<AsShaft>
31 {
32  public:
33  AsConstruct(AsShaft);
34  void initialize(void)
35  {
36  add(name, FE_USE("name"));
37  add(momentOfInertia, FE_USE("driveline:momentOfInertia"));
38  }
40  Accessor< t_atomic_real > momentOfInertia;
41 
42 };
43 
44 /// @brief
45 class AsExternalTorque
46  : public AccessorSet, public Initialize<AsExternalTorque>
47 {
48  public:
49  AsConstruct(AsExternalTorque);
50  void initialize(void)
51  {
52  add(externalTorque, FE_USE("driveline:externalTorque"));
53  }
54  Accessor< t_atomic_real > externalTorque;
55 
56 };
57 
58 /// @brief Run Time Driveline Shaft
60  : public AsShaft, public Initialize<AsShaftLive>
61 {
62  public:
63  AsConstruct(AsShaftLive);
64  void initialize(void)
65  {
66  // These driveline:* versions may be ratio different than solver
67  add(position, FE_USE("driveline:position"));
68  add(rps, FE_USE("driveline:rps"));
69  add(torque, FE_USE("driveline:torque"));
70  }
74 
75 };
76 
77 /// @brief Driveline
79  : public AccessorSet, public Initialize<AsDriveline>
80 {
81  public:
82  AsConstruct(AsDriveline);
83  void initialize(void)
84  {
85  add(model, FE_USE("driveline:model"));
86  add(contents, FE_USE("driveline:contents"));
87  }
88  Accessor< String > model;
89  Accessor< sp<RecordGroup> > contents;
90 
91 };
92 
93 /// @brief Run Time Driveline
95  : public AsDriveline, public Initialize<AsDrivelineLive>
96 {
97  public:
98  AsConstruct(AsDrivelineLive);
99  void initialize(void)
100  {
101  add(spDrivelineI, FE_USE("driveline:spDrivelineI"));
102  }
103  Accessor< sp<DrivelineI> > spDrivelineI;
104 };
105 
106 /// @brief Rotational Mechanical System
108  : public AccessorSet, public Initialize<AsRotationalMechanical>
109 {
110  public:
111  AsConstruct(AsRotationalMechanical);
112  void initialize(void)
113  {
114  add(model, FE_USE("driveline:model"));
115  add(contents, FE_USE("driveline:contents"));
116  }
117  Accessor< String > model;
118  Accessor< sp<RecordGroup> > contents;
119 
120 };
121 
122 /// @brief Run Time Rotational Mechanical System
124  : public AsRotationalMechanical,
125  public Initialize<AsRotationalMechanicalLive>
126 {
127  public:
128  AsConstruct(AsRotationalMechanicalLive);
129  void initialize(void)
130  {
131  add(spDrivelineI, FE_USE("driveline:spDrivelineI"));
132  }
133  Accessor< sp<DrivelineI> > spDrivelineI;
134 };
135 
136 class AsGearTrain
137  : public AccessorSet,
138  public Initialize<AsGearTrain>
139 {
140  public:
141  AsConstruct(AsGearTrain);
142  void initialize(void)
143  {
144  add(left_gear, FE_USE("driveline:left_gear"));
145  add(right_gear, FE_USE("driveline:right_gear"));
146  }
147  Accessor<int> left_gear;
148  Accessor<int> right_gear;
149 };
150 
151 } /* namespace ext */
152 } /* namespace fe */
153 
154 #endif /* __driveline_drivelineAS_h__ */
155 
Run Time Driveline Shaft.
Definition: drivelineAS.h:59
Set of accessors.
Definition: AccessorSet.h:18
Driveline.
Definition: drivelineAS.h:78
Rotational Mechanical System.
Definition: drivelineAS.h:107
Run Time Driveline.
Definition: drivelineAS.h:94
kernel
Definition: namespace.dox:3
Per-class participation in the Initialized <> mechanism.
Definition: Initialized.h:117
Named Records.
Definition: datatoolAS.h:134
Driveline Model.
Definition: drivelineAS.h:16
Run Time Rotational Mechanical System.
Definition: drivelineAS.h:123
const String & name(void) const
Return the components chosen name.
Definition: Component.h:77
Driveline Shaft.
Definition: drivelineAS.h:29