AGX Dynamics  2.35.0.1
agxControl::MeasurementSensor Class Reference

#include <MeasurementSensor.h>

+ Inheritance diagram for agxControl::MeasurementSensor:

Public Types

typedef agx::BitState< MeasurementState, agx::Int32 > MeasurementBitState
 
enum  MeasurementState { MASS = 1 , MASSFLOW = 2 , VOLUME = 4 , ALL = MASS | MASSFLOW | VOLUME }
 Enumeration specifying what should be recorded in a measurement sensor, expressed as a bit field. More...
 
- Public Types inherited from agxControl::EventSensor
typedef agx::Vector< agx::Physics::ParticlePairContactPtr > ParticlePairContactVector
 
typedef agx::List< EventPrioHolder< SensorEventRef > > SensorEventList
 
typedef std::map< agx::Uuid, EventPrioHolder< SensorEventRef > > SensorEvents
 
typedef agx::Vector< agxControl::SensorEvent * > SensorEventVector
 
enum  TriggerEventStages { SENSOR_PRE_STEP , SENSOR_POST_STEP }
 Defines the event execution states when the SensorEvents are executed during the timestep of the detected collision with the sensor. More...
 
- Public Types inherited from agxSDK::StepEventListener
enum  ActivationMask {
  STEP_NONE = 0x0 , PRE_COLLIDE = 0x1 , PRE_STEP = 0x2 , POST_STEP = 0x4 ,
  LAST_STEP = 0x8 , DEFAULT = PRE_STEP | POST_STEP , ALL = PRE_COLLIDE | PRE_STEP | POST_STEP | LAST_STEP
}
 Defines the event states for which a listener will be activated, a mask can be bitwise OR:ed from these members. More...
 
- Public Types inherited from agxSDK::EventListener
enum  Type { UNDEFINED_TYPE , STEP_EVENT_LISTENER , CONTACT_EVENT_LISTENER , GUI_EVENT_LISTENER }
 Type of EventListener. More...
 
- Public Types inherited from agx::Component
typedef Event2< Component *, Object * > ObjectEvent
 Event when adding removing child objects. More...
 
typedef Callback1< Object * > TraverseCallback
 
- Public Types inherited from agx::Object
typedef agx::observer_ptr< const Event > EventConstObserver
 
typedef agx::ref_ptr< const Event > EventConstRef
 
typedef agx::observer_ptr< Event > EventObserver
 
typedef agx::Vector< EventObserver > EventObserverVector
 
typedef agx::VectorPOD< Event * > EventPtrVector
 
typedef agx::ref_ptr< Event > EventRef
 
typedef agx::Vector< EventRef > EventRefVector
 

Public Member Functions

 MeasurementSensor ()
 Default constructor. More...
 
 MeasurementSensor (agxCollide::Geometry *geom)
 Constructor that takes the geometry to couple the sensor too. More...
 
 MeasurementSensor (agxCollide::Geometry *geom, int priority)
 Constructor that takes the geometry to couple the sensor too. More...
 
 MeasurementSensor (int priority)
 Constructor that takes the priority of the internal contact sensors. More...
 
const char * getClassName () const override
 
bool getEnableDataFilter () const
 Get if the measurement sensor should use exponential filters to smooth data from the measurements. More...
 
agx::Real getFilterPeriodTime () const
 Returns the period time for the internal exponential filters. More...
 
agx::Real getFilterSamplingTime () const
 Get the discrete sampling time for the internal exponential filters. More...
 
MeasurementState getMeasurementState () const
 Returns the MeasurementState that determines what should be recorded in the MeasurementSensor. More...
 
agx::Real getParticlePackingFraction () const
 Returns the total particle volume inside the sensor volume. More...
 
agxStream::StorageAgent * getStorageAgent () const override
 
agx::Real getTotalParticleMass () const
 Returns the total particle mass inside the sensor volume. More...
 
agx::Real getTotalParticleMassFlow () const
 Returns the total particle mass flow inside the sensor volume. More...
 
agx::Real getTotalParticleVolume () const
 Returns the total particle volume inside the sensor volume. More...
 
agx::Real getTotalRigidBodyMass () const
 Returns the total RigidBody mass inside the sensor volume. More...
 
agx::Real getTotalRigidBodyMassFlow () const
 Returns the total RigidBody mass flow inside the sensor volume. More...
 
agx::Real getTotalRigidBodyPackingFraction () const
 Returns the total RigidBody volume inside the sensor volume. More...
 
agx::Real getTotalRigidBodyVolume () const
 Returns the total RigidBody volume inside the sensor volume. More...
 
virtual void restore (agxStream::InputArchive &in) override
 
void setEnableDataFilter (bool enable)
 Set if the measurement sensor should use exponential filters to smooth data from the measurements. More...
 
void setFilterPeriodTime (agx::Real periodTime)
 Set the period time for the internal exponential filters. More...
 
void setFilterSamplingTime (agx::Real samplingTime)
 Set the discrete sampling time for the internal exponential filters. More...
 
void setMeasurementState (MeasurementState state)
 Sets the MeasurementState which determines what should be recorded in the MeasurementSensor. More...
 
virtual void store (agxStream::OutputArchive &out) const override
 
- Public Member Functions inherited from agxControl::EventSensor
 EventSensor ()
 Default constructor. More...
 
 EventSensor (agxCollide::Geometry *geometry)
 Constructor that takes the geometry to couple the sensor too. More...
 
 EventSensor (agxCollide::Geometry *geometry, int priority)
 Constructor that takes the geometry to couple the sensor too. More...
 
 EventSensor (int priority)
 This constructor takes the priority of the internal contact sensors. More...
 
void addGroup (agx::UInt32 group)
 
void addGroup (const agx::Name &group)
 Functions for adding and removing collision groups. More...
 
virtual void addNotification () override
 This will execute when the sensor is inserted in the simulation. More...
 
bool addSensorEvent (SensorEvent *sEvent, int priority=0)
 Sets a sensor event to the sensor with a priority. More...
 
bool containsSensorEvent (SensorEvent *sEvent)
 Checks if a sensor event already exists in the sensor. More...
 
int getCollisionMask ()
 
agx::UInt32Vector getContactingParticleIds ()
 
bool getEnableBlocker ()
 
agxCollide::Geometry * getGeometry ()
 Get the geometry of the sensor. More...
 
agxCollide::Geometry * getGeometry () const
 
agx::Real getNumParticleParticleContactsInSensor ()
 
agx::Real getNumParticlesInSensor () const
 
const ParticlePairContactVector & getParticlePairContactsInSensor ()
 Returns the current particle-particle contacts in the sensor geometry. More...
 
agx::UInt32Vector getParticlesInsideSensor ()
 
agx::RigidBodyPtrVector getRigidBodiesInsideSensor (bool onlyRigidBodyDEM=false)
 
SensorEvent * getSensorEvent (const agx::Uuid &uuid)
 Returns a sensor event with the given uuid if there exists one in the sensor. More...
 
SensorEventVector getSensorEvents ()
 Returns the SensorEvents currently active in the Sensor in the order of execution priority. More...
 
int getTriggerFlag ()
 
bool hasGroup (agx::UInt32 group)
 
bool hasGroup (const agx::Name &group)
 
bool hasOnlyReference ()
 Checks if the sensor keeps the only reference to its internal contact listener. Used in unittest. More...
 
bool isForbiddenGeometry (agxCollide::Geometry *geom)
 Check if the geometry is marked as forbidden by a sensor in this time step. More...
 
bool isForbiddenParticle (agx::UInt32 particle)
 Check if the particle is marked as forbidden by a sensor in this time step. More...
 
virtual void post (const agx::TimeStamp &time) override
 Called after a step is taken in the simulation Implement this method in the derived class to get callbacks. More...
 
virtual void pre (const agx::TimeStamp &time) override
 Called before a step is taken in the simulation Implement this method in the derived class to get callbacks. More...
 
virtual void preCollide (const agx::TimeStamp &time) override
 Called before collision detection is performed in the simulation Implement this method in the derived class to get callbacks. More...
 
void removeAllGroups ()
 
void removeGroup (agx::UInt32 group)
 
void removeGroup (const agx::Name &group)
 
virtual void removeNotification () override
 This function will execute when the sensor is removed form the simulation. More...
 
bool removeSensorEvent (SensorEvent *sEvent)
 Removes a sensor event in the sensor. More...
 
void setCollisionMask (int mask)
 Set/get the collision mask for the sensor. More...
 
void setEnableBlocker (bool isBlocker)
 Set the sensor to block the contact from other sensors. More...
 
void setGeometry (agxCollide::Geometry *geometry)
 Sets the geometry of the sensor. More...
 
void setTriggerFlag (int flag)
 Set/get the trigger flag to control when the events will be executed during the time-step of contact detection. More...
 
- Public Member Functions inherited from agxSDK::StepEventListener
 StepEventListener (int mask=DEFAULT)
 Default constructor, sets the default activation mask to all (POST_STEP and PRE_STEP) events. More...
 
const char * getClassName () const override
 
agxStream::StorageAgent * getStorageAgent () const override
 
virtual void last (const agx::TimeStamp &time)
 Called after a step is taken in the simulation Implement this method in the derived class to get callbacks. More...
 
virtual void setMask (int mask) override
 Specifies a bitmask which determines which event types will activate this listener. More...
 
- Public Member Functions inherited from agxSDK::EventListener
int getMask () const
 
agx::UInt32 getPriority () const
 
Simulation * getSimulation ()
 
const Simulation * getSimulation () const
 
Type getType () const
 
bool isEnabled () const
 
void setEnable (bool enable)
 Specify whether the listener should react at all at events. More...
 
- Public Member Functions inherited from agx::Component
 Component (const agx::Name &name=agx::Name(), agx::Model *model=agx::Component::ClassModel(), agx::Device *device=nullptr)
 
virtual void addObject (agx::Object *object, bool assignContext=true)
 Add an object to the component. More...
 
virtual String autoComplete (const String &partialName, StringVector &matchingNames) const
 
virtual void buildNavigationTree (agxJson::Value &eNode) const override
 
void configure (Model *model)
 
virtual void configure (TiXmlElement *eComponent) override
 
agx::Device * getDevice ()
 
template<typename T >
T * getDevice ()
 
const agx::Device * getDevice () const
 
template<typename T >
const T * getDevice () const
 
size_t getNumObjects (const agx::Name &name) const
 
agx::Object * getObject (const agx::Name &name, agx::Model *model, size_t index=0)
 
const agx::Object * getObject (const agx::Name &name, agx::Model *model, size_t index=0) const
 
agx::Object * getObject (const agx::Name &name, size_t index=0)
 
template<typename T >
T * getObject (const agx::Name &name, size_t index=0)
 
const agx::Object * getObject (const agx::Name &name, size_t index=0) const
 
template<typename T >
const T * getObject (const agx::Name &name, size_t index=0) const
 
const agx::ObjectRefVector & getObjects () const
 
template<typename T >
void getObjects (agx::ObjectPtrVector &result, bool recursive=false) const
 
void getObjects (agx::ObjectPtrVector &result, const agx::Model *model, bool recursive=false) const
 
virtual Object * getResourceImpl (const Path &path, agx::Model *model) override
 
virtual void printSubtree () const override
 
void printSubtree (std::ostream &stream, int depth=0) const
 
virtual void rebind () override
 
void removeAllObjects ()
 Remove all components. More...
 
virtual void removeObject (agx::Object *object)
 Remove an object from the component. More...
 
void removeObject (const agx::Name &name, size_t index=0)
 Remove an object with a specified name (and optional index) from the component. More...
 
virtual void snapshot (TiXmlNode *eParent, const String &directory) const override
 
void traverse (ComponentVisitor *)
 
void traverse (const TraverseCallback &callback)
 
- Public Member Functions inherited from agx::Object
 Object (const Name &name=Name(), Model *model=Object::ClassModel())
 
void addListener (EventListener *listener)
 
agx::String fullName () const
 
agx::String fullPath () const
 
agx::String fullPath (const agx::Object *root) const
 
template<typename T >
T * getAutoScopedResource (const agx::Path &path)
 
template<typename T >
const T * getAutoScopedResource (const agx::Path &path) const
 
agx::Object * getAutoScopedResource (const agx::Path &path, agx::Model *model=nullptr)
 
const agx::Object * getAutoScopedResource (const agx::Path &path, agx::Model *model=nullptr) const
 
agx::Object * getContext ()
 
template<typename T >
T * getContext ()
 
const agx::Object * getContext () const
 
template<typename T >
const T * getContext () const
 
agx::UInt32 getId () const
 
const agx::Name & getImplementationName () const
 
agx::Model * getModel ()
 
const agx::Model * getModel () const
 
const agx::Name & getName () const
 
agx::Object * getNextSibling ()
 
const agx::Object * getNextSibling () const
 
agx::Path getPath () const
 
agx::Path getPath (const agx::Object *root) const
 
template<typename T >
T * getResource (const agx::Path &path)
 
template<typename T >
const T * getResource (const agx::Path &path) const
 
agx::Object * getResource (const agx::Path &path, agx::Model *model=nullptr)
 
const agx::Object * getResource (const agx::Path &path, agx::Model *model=nullptr) const
 
agx::Object * getRootContext ()
 
const agx::Object * getRootContext () const
 
bool hasListener (EventListener *listener)
 
bool hasParent (const agx::Object *node) const
 
bool isUnique () const
 
void removeListener (EventListener *listener)
 
virtual void save (TiXmlElement *) const
 
virtual void setContext (agx::Object *context)
 
void setId (UInt32 id)
 
void setModel (agx::Model *model)
 Set the object model (handled automatically). More...
 
void setName (const agx::Name &name)
 Set the name of the object. More...
 
- Public Member Functions inherited from agx::Referenced
 Referenced ()
 Default constructor. More...
 
 Referenced (const Referenced &)
 
template<typename T >
T * as ()
 Subclass casting. More...
 
template<typename T >
const T * as () const
 
template<typename T >
T * asSafe ()
 Safe subclass casting, return nullptr if template type does not match. More...
 
template<typename T >
const T * asSafe () const
 
int getReferenceCount () const
 
template<typename T >
bool is () const
 Subclass test. More...
 
Referenced & operator= (const Referenced &)
 Assignment operator. Will increment the number of references to the referenced object. More...
 
void reference (void *ptr=nullptr) const
 Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
void unreference (void *ptr=nullptr) const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unreference_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
- Public Member Functions inherited from agxStream::Serializable
virtual ~Serializable ()
 Destructor for normal C++ use but hidden from SWIG bindings. More...
 
bool getEnableSerialization () const
 
bool getEnableUuidGeneration ()
 
agx::UInt32 getIndex () const
 This index is given at creation of this object. More...
 
agx::Uuid getUuid () const
 
bool isFinished () const
 
void setEnableSerialization (bool flag)
 Set to false to disable serialization of this object. More...
 
void setFinished ()
 Tells this class that it is restored correctly and should not be deleted during destruction of an Archive. More...
 
void setUuid (const agx::Uuid &uuid)
 Explicitly set a Uuid on a serializable object. More...
 

Static Public Member Functions

static agxStream::Serializable * create ()
 
static agxStream::Serializable * create (agxStream::InputArchive &)
 
static MeasurementSensor * find (const agxSDK::Simulation *simulation, const agx::Name &name)
 
static MeasurementSensorPtrVector findAll (const agxSDK::Simulation *simulation)
 Finds all MeasurementSensors in the given simulation. More...
 
static MeasurementSensorPtrVector findAll (const agxSDK::Simulation *simulation, const agx::Name &name)
 Find all MeasurementSensors with given name. More...
 
static const char * getConstructClassId ()
 
- Static Public Member Functions inherited from agxControl::EventSensor
static agxStream::Serializable * create ()
 
static agxStream::Serializable * create (agxStream::InputArchive &)
 
static const char * getConstructClassId ()
 
- Static Public Member Functions inherited from agxSDK::StepEventListener
static agxStream::Serializable * create ()
 
static agxStream::Serializable * create (agxStream::InputArchive &)
 
static const char * getConstructClassId ()
 
- Static Public Member Functions inherited from agxSDK::EventListener
static agxStream::Serializable * create ()
 
static agxStream::Serializable * create (agxStream::InputArchive &)
 
static const char * getConstructClassId ()
 
- Static Public Member Functions inherited from agx::Component
static Component * _load (TiXmlElement *eComponent, Device *device)
 
static agx::Model * ClassModel ()
 
static Component * load (const Path &path, const Name &implementation, Device *device, const Path &_namespace=Path())
 
static Component * load (const String &path, const Path &_namespace=Path())
 
static Component * load (const String &path, Device *device, const Path &_namespace=Path())
 
static Component * load (TiXmlElement *eComponent, Device *device)
 
- Static Public Member Functions inherited from agx::Object
static agx::Model * ClassModel ()
 
static agx::String generateName (const agx::String &bindPath)
 
static const HashSet< Object * > & getActiveObjects ()
 
static bool getEnableRebind ()
 Should rebinding be allowed? Right now a global setting. More...
 
static Object * load (const String &path, Device *device, const String &type, const String &attribute, const String &value)
 
template<typename T >
static T * load (const String &path, Device *device, const String &type, const String &attribute, const String &value)
 
static Object * load (const String &path, Device *device, const String &type="", size_t instance=0)
 
template<typename T >
static T * load (const String &path, Device *device, const String &type="", size_t instance=0)
 
static void load (const String &path, Device *device, ObjectPtrVector &loadedObjects)
 
static Object * load (TiXmlElement *eObject, Device *device)
 
template<typename T >
static T * load (TiXmlElement *eObject, Device *device)
 
static TiXmlDocument openDocument (const String &path)
 
static void setEnableRebind (bool flag)
 Sets if rebinding of objects should be allowed (Right now a global setting). More...
 
- Static Public Member Functions inherited from agx::Referenced
template<typename T >
static bool ValidateCast (const Referenced *object)
 
- Static Public Member Functions inherited from agxStream::Serializable
static void setEnableUuidGeneration (bool flag)
 Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled. More...
 

Protected Member Functions

virtual ~MeasurementSensor ()
 Default destructor. More...
 
agx::Real getValue (const agx::Name &operationIdentifier, bool useFiltered) const
 Returns a value from a measurement operations with specified name identifier. Will return a filtered version if useFiltered is specified. More...
 
void initFilters ()
 Initializes the value filters in the measurement operations. More...
 
void initOperations ()
 Initializes and adds the internal operations to the simulation that the sensor is added to. More...
 
void updateMeasurementOperationsFromBitState ()
 
- Protected Member Functions inherited from agxControl::EventSensor
virtual ~EventSensor ()
 Destructor. More...
 
void clearContactInformation ()
 
void constructSortedEventList ()
 
bool contactIsValid (agxCollide::GeometryContact *cd)
 
void executeSensorEvents (const agx::TimeStamp &t)
 
agx::RigidBody * getContactingRigidBody (agxCollide::GeometryContact *cd) const
 
SensorEvent * getSensorEventFromName (const agx::Name &name)
 
void init ()
 
bool particleContactIsValid (const agx::TimeStamp &t, agx::Physics::ParticleGeometryContactInstance contact, agx::Physics::ParticleData &particleData, agx::Physics::GeometryData &geometryData)
 
void refreshParticlesInsideSensorData ()
 
void refreshRigidBodiesInsideSensorData ()
 
void signalGeometryContact (const agx::TimeStamp &t, agxCollide::GeometryContact *cd)
 
void signalParticleContact (const agx::TimeStamp &t, agx::Physics::ParticleGeometryContactInstance contact, agx::Physics::ParticleData &particleData, agx::Physics::GeometryData &geometryData)
 
void triggerContactEvents ()
 
void triggerEventAddNotification ()
 
void triggerEvents ()
 
void triggerEventsOnContact (const agx::TimeStamp &t, agxCollide::GeometryContact *cd)
 
void triggerParticleEvents ()
 
void triggerParticleEventsOnContact (const agx::TimeStamp &t, agx::Physics::ParticleGeometryContactInstance contact, agx::Physics::ParticleData &particleData, agx::Physics::GeometryData &geometryData)
 
void triggerPostContactHandling ()
 
void tryTriggerEventsOnContact (const agx::TimeStamp &t, agxCollide::GeometryContact *cd)
 
void tryTriggerParticleEventsOnContact (const agx::TimeStamp &t, agx::Physics::ParticleGeometryContactInstance contact, agx::Physics::ParticleData &particleData, agx::Physics::GeometryData &geometryData)
 
void updateSensorEvents (const agx::TimeStamp &t)
 
- Protected Member Functions inherited from agxSDK::StepEventListener
virtual ~StepEventListener ()
 Destructor. More...
 
- Protected Member Functions inherited from agxSDK::EventListener
 EventListener (Type type=UNDEFINED_TYPE)
 Default constructor. More...
 
virtual ~EventListener ()
 Destructor. More...
 
void setSimulation (Simulation *simulation)
 Set the associated simulation for this EventListener. More...
 
- Protected Member Functions inherited from agx::Component
virtual ~Component ()
 
String expandAutoCompletionMatch (const String &query, const StringVector &matchingNames) const
 
void setDevice (Device *device)
 
- Protected Member Functions inherited from agx::Object
virtual ~Object ()
 
- Protected Member Functions inherited from agx::Referenced
virtual ~Referenced ()
 Destructor. More...
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 
- Protected Member Functions inherited from agxStream::Serializable
 Serializable ()
 Default constructor. More...
 
 Serializable (const Serializable &other)
 Copy constructor. More...
 
void generateUuid ()
 

Protected Attributes

agx::Real m_filterPeriodTime
 
agx::Real m_filterSamplingTime
 
MeasurementBitState m_measurementState
 
OperationMap m_operationMap
 
agxControl::CalculateTotalMassFlowRef m_totalMassFlowOperation
 
agxControl::CalculateTotalMassRef m_totalMassOperation
 
agxControl::CalculateTotalRigidBodyDEMMassRef m_totalRigidBodyMass
 
agxControl::CalculateTotalRigidBodyDEMMassFlowRef m_totalRigidBodyMassFlow
 
agxControl::RigidBodyDEMVolumeCalculatorRef m_totalRigidBodyVolume
 
agxControl::VolumeCalculatorRef m_totalVolumeOperation
 
bool m_useDataFilters
 
- Protected Attributes inherited from agxControl::EventSensor
bool hasComputedParticlePairContactsInSensor
 Vector that stores particle pair contacts. Will only be computed if the user asks for it (getParticlePairContactsInSensor) More...
 
int m_collisionMask
 Get the collision mask for the sensor. More...
 
GeometryContactEventListenerRef m_contactListener
 Listeners that are coupled with the sensor. More...
 
agxSDK::CollisionGroupFilterRef m_filter
 The collision group filter coupled with the ContactEventListener. More...
 
GeometryContactQueue m_geomContactQueue
 Queues for the contacts. More...
 
agxCollide::Geometry * m_geometry
 The coupled geometry of the sensor. More...
 
bool m_geometryCollision
 
bool m_isBlocker
 True if the sensor should block the contact from other sensors in the scene under the same timestep. More...
 
bool m_particleCollision
 Flags for doing when there is a collision for a particle or geometry. More...
 
ParticleContactListenerRef m_particleContactListener
 
ParticleContactQueue m_particleContactQueue
 
ParticlePairContactVector m_particlePairContacts
 
agx::HashSet< agx::UInt32 > m_particlesInSensor
 Holds a set of the current particle id:s that are present in the sensor. More...
 
agx::HashSet< agx::UInt32 > m_particlesInsideSensor
 Holds a set of the current particle id:s whose midpoint is inside the sensor. More...
 
int m_priority
 Priority of the sensor over all the other sensors. More...
 
agx::HashSet< agx::RigidBody * > m_rigidBodiesContactingSensor
 Holds pointers to the current rigid bodies (DEM Objects) in the sensor. More...
 
agx::HashSet< agx::RigidBody * > m_rigidBodiesInsideSensor
 Holds pointers to the current rigid bodies (DEM Objects) where the midpoint is INSIDE the sensor. More...
 
int m_triggerFlag
 Flag for when the events are supposed to be executed during the time-step. More...
 
- Protected Attributes inherited from agxSDK::EventListener
bool m_enabled
 
int m_mask
 
agx::UInt32 m_priority
 
Type m_type
 
- Protected Attributes inherited from agx::Referenced
Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

Additional Inherited Members

- Public Attributes inherited from agxControl::EventSensor
SensorEventList m_sensorEventList
 
SensorEvents m_sensorEvents
 
- Public Attributes inherited from agx::Component
ObjectEvent addObjectEvent
 
ObjectEvent removeObjectEvent
 
- Protected Types inherited from agxControl::EventSensor
typedef agx::observer_ptr< const GeometryContactEventListener > GeometryContactEventListenerConstObserver
 
typedef agx::ref_ptr< const GeometryContactEventListener > GeometryContactEventListenerConstRef
 
typedef agx::observer_ptr< GeometryContactEventListener > GeometryContactEventListenerObserver
 
typedef agx::Vector< GeometryContactEventListenerObserver > GeometryContactEventListenerObserverVector
 
typedef agx::VectorPOD< GeometryContactEventListener * > GeometryContactEventListenerPtrVector
 
typedef agx::ref_ptr< GeometryContactEventListener > GeometryContactEventListenerRef
 
typedef agx::Vector< GeometryContactEventListenerRef > GeometryContactEventListenerRefVector
 
typedef agx::Vector< ContactInformation > GeometryContactQueue
 
typedef agx::observer_ptr< const ParticleContactListener > ParticleContactListenerConstObserver
 
typedef agx::ref_ptr< const ParticleContactListener > ParticleContactListenerConstRef
 
typedef agx::observer_ptr< ParticleContactListener > ParticleContactListenerObserver
 
typedef agx::Vector< ParticleContactListenerObserver > ParticleContactListenerObserverVector
 
typedef agx::VectorPOD< ParticleContactListener * > ParticleContactListenerPtrVector
 
typedef agx::ref_ptr< ParticleContactListener > ParticleContactListenerRef
 
typedef agx::Vector< ParticleContactListenerRef > ParticleContactListenerRefVector
 
typedef agx::Vector< ParticleContactInformation > ParticleContactQueue
 
- Static Protected Member Functions inherited from agx::Referenced
static DeleteHandler * getDeleteHandler ()
 
static void setDeleteHandler (DeleteHandler *handler)
 Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. More...
 
- Static Protected Attributes inherited from agxControl::EventSensor
static agxCollide::GeometryPtrVector g_forbiddenGeometries
 
static agx::UInt32Vector g_forbiddenParticles
 

Detailed Description

Definition at line 40 of file MeasurementSensor.h.

Member Typedef Documentation

◆ MeasurementBitState

Member Enumeration Documentation

◆ MeasurementState

Enumeration specifying what should be recorded in a measurement sensor, expressed as a bit field.

Enumerator
MASS 
MASSFLOW 
VOLUME 
ALL 

Definition at line 47 of file MeasurementSensor.h.

Constructor & Destructor Documentation

◆ MeasurementSensor() [1/4]

agxControl::MeasurementSensor::MeasurementSensor ( )

Default constructor.

◆ MeasurementSensor() [2/4]

agxControl::MeasurementSensor::MeasurementSensor ( int  priority)

Constructor that takes the priority of the internal contact sensors.

Parameters
priority- Priority of the internal contact listeners.

◆ MeasurementSensor() [3/4]

agxControl::MeasurementSensor::MeasurementSensor ( agxCollide::Geometry *  geom)

Constructor that takes the geometry to couple the sensor too.

Parameters
geomThe geometry that the sensor will register all the contacts from.

◆ MeasurementSensor() [4/4]

agxControl::MeasurementSensor::MeasurementSensor ( agxCollide::Geometry *  geom,
int  priority 
)

Constructor that takes the geometry to couple the sensor too.

All collision on the geometry will be registered by the sensor.

Parameters
geomThe geometry that the sensor will register all the contacts from.
priority- Priority of the internal contact listeners.

◆ ~MeasurementSensor()

virtual agxControl::MeasurementSensor::~MeasurementSensor ( )
protectedvirtual

Default destructor.

Member Function Documentation

◆ create() [1/2]

static agxStream::Serializable* agxControl::MeasurementSensor::create ( )
inlinestatic

Definition at line 154 of file MeasurementSensor.h.

◆ create() [2/2]

static agxStream::Serializable* agxControl::MeasurementSensor::create ( agxStream::InputArchive &  )
inlinestatic

Definition at line 154 of file MeasurementSensor.h.

◆ find()

static MeasurementSensor* agxControl::MeasurementSensor::find ( const agxSDK::Simulation *  simulation,
const agx::Name &  name 
)
static
Parameters
simulation- simulation the MeasurementSensor is part of.
name- name of the MeasurementSensors.
Returns
the MeasurementSensor with the given name.

◆ findAll() [1/2]

static MeasurementSensorPtrVector agxControl::MeasurementSensor::findAll ( const agxSDK::Simulation *  simulation)
static

Finds all MeasurementSensors in the given simulation.

Parameters
simulation- simulation with MeasurementSensors.
Returns
vector of MeasurementSensors.

◆ findAll() [2/2]

static MeasurementSensorPtrVector agxControl::MeasurementSensor::findAll ( const agxSDK::Simulation *  simulation,
const agx::Name &  name 
)
static

Find all MeasurementSensors with given name.

Parameters
simulation- simulation the MeasurementSensor is part of.
name- name of the MeasurementSensor.
Returns
vector of MeasurementSensors.

◆ getClassName()

const char* agxControl::MeasurementSensor::getClassName ( ) const
inlineoverridevirtual
Returns
the class name of this class.

Reimplemented from agxControl::EventSensor.

Definition at line 154 of file MeasurementSensor.h.

◆ getConstructClassId()

static const char* agxControl::MeasurementSensor::getConstructClassId ( )
inlinestatic

Definition at line 154 of file MeasurementSensor.h.

◆ getEnableDataFilter()

bool agxControl::MeasurementSensor::getEnableDataFilter ( ) const

Get if the measurement sensor should use exponential filters to smooth data from the measurements.

Definition at line 198 of file MeasurementSensor.h.

References m_useDataFilters.

◆ getFilterPeriodTime()

agx::Real agxControl::MeasurementSensor::getFilterPeriodTime ( ) const

Returns the period time for the internal exponential filters.

◆ getFilterSamplingTime()

agx::Real agxControl::MeasurementSensor::getFilterSamplingTime ( ) const

Get the discrete sampling time for the internal exponential filters.

◆ getMeasurementState()

MeasurementState agxControl::MeasurementSensor::getMeasurementState ( ) const

Returns the MeasurementState that determines what should be recorded in the MeasurementSensor.

◆ getParticlePackingFraction()

agx::Real agxControl::MeasurementSensor::getParticlePackingFraction ( ) const

Returns the total particle volume inside the sensor volume.

◆ getStorageAgent()

agxStream::StorageAgent* agxControl::MeasurementSensor::getStorageAgent ( ) const
inlineoverridevirtual
Returns
the storage agent

Reimplemented from agxControl::EventSensor.

Definition at line 154 of file MeasurementSensor.h.

◆ getTotalParticleMass()

agx::Real agxControl::MeasurementSensor::getTotalParticleMass ( ) const

Returns the total particle mass inside the sensor volume.

◆ getTotalParticleMassFlow()

agx::Real agxControl::MeasurementSensor::getTotalParticleMassFlow ( ) const

Returns the total particle mass flow inside the sensor volume.

◆ getTotalParticleVolume()

agx::Real agxControl::MeasurementSensor::getTotalParticleVolume ( ) const

Returns the total particle volume inside the sensor volume.

◆ getTotalRigidBodyMass()

agx::Real agxControl::MeasurementSensor::getTotalRigidBodyMass ( ) const

Returns the total RigidBody mass inside the sensor volume.

◆ getTotalRigidBodyMassFlow()

agx::Real agxControl::MeasurementSensor::getTotalRigidBodyMassFlow ( ) const

Returns the total RigidBody mass flow inside the sensor volume.

◆ getTotalRigidBodyPackingFraction()

agx::Real agxControl::MeasurementSensor::getTotalRigidBodyPackingFraction ( ) const

Returns the total RigidBody volume inside the sensor volume.

◆ getTotalRigidBodyVolume()

agx::Real agxControl::MeasurementSensor::getTotalRigidBodyVolume ( ) const

Returns the total RigidBody volume inside the sensor volume.

◆ getValue()

agx::Real agxControl::MeasurementSensor::getValue ( const agx::Name &  operationIdentifier,
bool  useFiltered 
) const
protected

Returns a value from a measurement operations with specified name identifier. Will return a filtered version if useFiltered is specified.

◆ initFilters()

void agxControl::MeasurementSensor::initFilters ( )
protected

Initializes the value filters in the measurement operations.

◆ initOperations()

void agxControl::MeasurementSensor::initOperations ( )
protected

Initializes and adds the internal operations to the simulation that the sensor is added to.

◆ restore()

virtual void agxControl::MeasurementSensor::restore ( agxStream::InputArchive &  in)
overridevirtual

Reimplemented from agxControl::EventSensor.

◆ setEnableDataFilter()

void agxControl::MeasurementSensor::setEnableDataFilter ( bool  enable)

Set if the measurement sensor should use exponential filters to smooth data from the measurements.

Definition at line 200 of file MeasurementSensor.h.

References m_useDataFilters.

◆ setFilterPeriodTime()

void agxControl::MeasurementSensor::setFilterPeriodTime ( agx::Real  periodTime)

Set the period time for the internal exponential filters.

◆ setFilterSamplingTime()

void agxControl::MeasurementSensor::setFilterSamplingTime ( agx::Real  samplingTime)

Set the discrete sampling time for the internal exponential filters.

◆ setMeasurementState()

void agxControl::MeasurementSensor::setMeasurementState ( MeasurementState  state)

Sets the MeasurementState which determines what should be recorded in the MeasurementSensor.

Parameters
state- MeasurementState specifying what the sensor should record.

◆ store()

virtual void agxControl::MeasurementSensor::store ( agxStream::OutputArchive &  out) const
overridevirtual

Reimplemented from agxControl::EventSensor.

◆ updateMeasurementOperationsFromBitState()

void agxControl::MeasurementSensor::updateMeasurementOperationsFromBitState ( )
protected

Member Data Documentation

◆ m_filterPeriodTime

agx::Real agxControl::MeasurementSensor::m_filterPeriodTime
protected

Definition at line 194 of file MeasurementSensor.h.

◆ m_filterSamplingTime

agx::Real agxControl::MeasurementSensor::m_filterSamplingTime
protected

Definition at line 195 of file MeasurementSensor.h.

◆ m_measurementState

MeasurementBitState agxControl::MeasurementSensor::m_measurementState
protected

Definition at line 181 of file MeasurementSensor.h.

◆ m_operationMap

OperationMap agxControl::MeasurementSensor::m_operationMap
protected

Definition at line 192 of file MeasurementSensor.h.

◆ m_totalMassFlowOperation

agxControl::CalculateTotalMassFlowRef agxControl::MeasurementSensor::m_totalMassFlowOperation
protected

Definition at line 185 of file MeasurementSensor.h.

◆ m_totalMassOperation

agxControl::CalculateTotalMassRef agxControl::MeasurementSensor::m_totalMassOperation
protected

Definition at line 184 of file MeasurementSensor.h.

◆ m_totalRigidBodyMass

agxControl::CalculateTotalRigidBodyDEMMassRef agxControl::MeasurementSensor::m_totalRigidBodyMass
protected

Definition at line 187 of file MeasurementSensor.h.

◆ m_totalRigidBodyMassFlow

agxControl::CalculateTotalRigidBodyDEMMassFlowRef agxControl::MeasurementSensor::m_totalRigidBodyMassFlow
protected

Definition at line 188 of file MeasurementSensor.h.

◆ m_totalRigidBodyVolume

agxControl::RigidBodyDEMVolumeCalculatorRef agxControl::MeasurementSensor::m_totalRigidBodyVolume
protected

Definition at line 189 of file MeasurementSensor.h.

◆ m_totalVolumeOperation

agxControl::VolumeCalculatorRef agxControl::MeasurementSensor::m_totalVolumeOperation
protected

Definition at line 186 of file MeasurementSensor.h.

◆ m_useDataFilters

bool agxControl::MeasurementSensor::m_useDataFilters
protected

Definition at line 193 of file MeasurementSensor.h.

Referenced by getEnableDataFilter(), and setEnableDataFilter().


The documentation for this class was generated from the following file: