AGXDynamics  2.35.0.3
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:
47  SpoolValve();
48 
59  bool link(agxHydraulics::FlowUnit* input, agxHydraulics::FlowUnit* output);
60 
68  bool unlink(agxHydraulics::FlowUnit* flowUnit);
69 
74  bool doesLinkExist(agxHydraulics::FlowUnit* input, agxHydraulics::FlowUnit* output) const;
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
115 
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
agxPowerLine::Side
Side
Definition: Sides.h:30
FlowConnector.h
DOXYGEN_END_INTERNAL_BLOCK
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:97
agxUtil::ConstraintHolder
Utility class to hold custom implementations of constraints.
Definition: agxUtil.h:463
agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation
Constraint implementation for constraining a number of physical dimensions of the same type.
Definition: PowerLineConstraints.h:150
DOXYGEN_START_INTERNAL_BLOCK
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:96
agxStream::StorageStream
Abstract base class for storing/restoring a line/drums with version control.
Definition: StorageStream.h:48
AGXSTREAM_DECLARE_SERIALIZABLE
#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
agx
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Definition: AddedMassInteraction.h:22
AGXHYDRAULICS_EXPORT
#define AGXHYDRAULICS_EXPORT
Definition: agxHydraulics/export.h:39
agxPowerLine::Unit
Pure virtual class.
Definition: Unit.h:72
SpoolValveConnectionInfo.h
agxSDK::Simulation
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:126
agxHydraulics::FlowConnector
A FlowConnector is a junction of a set of FlowUnits.
Definition: FlowConnector.h:39
AGX_DECLARE_POINTER_TYPES
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:248
agxPowerLine::Connector
Links two connections together.
Definition: Connector.h:53
agxHydraulics::SpoolValve
Spool valves are used to dynamically redirect flow during a simulation.
Definition: SpoolValve.h:44
agxHydraulics
The agxHydraulics namespace contains classes for modeling hydraulic circuits within the power line fr...
Definition: Accumulator.h:27
agxHydraulics::FlowUnit
FlowUnit is the base class for Units that contains a FlowDimension.
Definition: FlowUnit.h:66
agx::HashVector< agxHydraulics::FlowUnit *, detail::SpoolValveConnectionInfo >
FlowUnit.h