AGX Dynamics  2.35.0.1
SpoolValve.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2022. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 
18 #ifndef AGXHYDRAULICS_SPOOL_VALVE_CONNECTOR_H
19 #define AGXHYDRAULICS_SPOOL_VALVE_CONNECTOR_H
20 
22 #include <agxHydraulics/FlowUnit.h>
23 
25 
26 
27 namespace agxHydraulics
28 {
30 
31 
45  {
46  public:
48 
60 
69 
75 
79  size_t getNumLinks() const;
80 
81 
96  virtual bool connect(
97  agxPowerLine::Side mySide,
98  agxPowerLine::Side unitSide,
99  agxPowerLine::Unit* unit) override;
100 
101  using Connector::connect;
102 
103  virtual bool disconnect(agxPowerLine::Unit* unit) override;
104 
105  virtual bool disconnect() override;
106 
107 
108 
109  // Methods called by the rest of the PowerLine/Hydraulics frame work.
110  public:
112  virtual agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation* createConstraint() override;
113 
114 #ifndef SWIG
117  virtual bool removeNotification(
118  agxUtil::ConstraintHolder* constraintHolder,
119  agxSDK::Simulation* simulation) override;
120 
121 
125  virtual bool store(agxStream::StorageStream& str) const override;
126 
130  virtual bool restore(agxStream::StorageStream& str) override;
131 
133 #endif
135 
136  typedef agx::HashVector<agxHydraulics::FlowUnit*, detail::SpoolValveConnectionInfo> UnitPtrSpoolValveInfoTable;
137 
138  protected:
139  virtual ~SpoolValve();
140 
141  private:
142  void removeInternalFlowConnector(agxHydraulics::FlowConnector* connector);
143  void removeInternalFlowUnit(agxHydraulics::FlowUnit* unit);
144 
145  private:
146  UnitPtrSpoolValveInfoTable m_connectionInfo;
147  };
148 }
149 
150 
151 #endif
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:248
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
Definition: Serializable.h:207
#define AGXHYDRAULICS_EXPORT
A FlowConnector is a junction of a set of FlowUnits.
Definition: FlowConnector.h:40
FlowUnit is the base class for Units that contains a FlowDimension.
Definition: FlowUnit.h:67
Spool valves are used to dynamically redirect flow during a simulation.
Definition: SpoolValve.h:45
size_t getNumLinks() const
bool unlink(agxHydraulics::FlowUnit *flowUnit)
Remove the given FlowUnit from its current FlowUnit set, making it the sole member of a new FlowUnit ...
bool doesLinkExist(agxHydraulics::FlowUnit *input, agxHydraulics::FlowUnit *output) const
bool link(agxHydraulics::FlowUnit *input, agxHydraulics::FlowUnit *output)
Create a link between the two given FlowUnits, in effect merging the two FlowUnit sets into a single ...
virtual bool disconnect() override
virtual bool connect(agxPowerLine::Side mySide, agxPowerLine::Side unitSide, agxPowerLine::Unit *unit) override
Connect the given Unit, which must be a FlowUnit, to the SpoolValve.
virtual bool disconnect(agxPowerLine::Unit *unit) override
Disconnect the given unit from this Connector.
Links two connections together.
Definition: Connector.h:54
Pure virtual class.
Definition: Unit.h:73
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:127
Abstract base class for storing/restoring a line/drums with version control.
Definition: StorageStream.h:49
Utility class to hold custom implementations of constraints.
Definition: agxUtil.h:464
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:97
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:96
The agxHydraulics namespace contains classes for modeling hydraulic circuits within the power line fr...
Definition: Accumulator.h:28
agxPowerLine contains a collection of connected components that transport power across a system.
Definition: MotorUnit.h:24
The agx namespace contains the dynamics/math part of the AGX Dynamics API.