Hopsan
|
A hydraulic node. More...
#include <Nodes.h>
Public Types | |
enum | DataIndexEnumT { Flow , Pressure , Temperature , WaveVariable , CharImpedance , HeatFlow , DataLength } |
The data variable indexes, DataLength is used internally. | |
enum | DataIndexEnumOldT { FLOW , PRESSURE , TEMPERATURE , WAVEVARIABLE , CHARIMP , HEATFLOW } |
Static Public Member Functions | |
static Node * | CreatorFunction () |
Additional Inherited Members | |
Public Member Functions inherited from Node | |
Node (const size_t datalength) | |
virtual void | setSignalNumDimensions (size_t numDims) |
const HString & | getNiceName () const |
const HString & | getNodeType () const |
returns the node type | |
size_t | getNumDataVariables () const |
Returns the total number of variables in a node. | |
int | getDataIdFromName (const HString &rName) const |
This function gives you the data Id for a named data variable. | |
double | getDataValue (const size_t dataId) const |
get data from node | |
void | setDataValue (const size_t dataId, const double data) |
set data in node | |
const std::vector< NodeDataDescription > * | getDataDescriptions () const |
Get the vector of data descriptions for the node. | |
const NodeDataDescription * | getDataDescription (const size_t id) const |
virtual void | setSignalQuantity (const HString &rQuantity, const HString &rUnit, const size_t dataId=0) |
This function can be used to set unit string and displayName for signal nodes ONLY. | |
virtual void | setSignalQuantityModifyable (bool tf, const size_t dataId=0) |
virtual HString | getSignalQuantity (const size_t dataId=0) const |
virtual bool | getSignalQuantityModifyable (const size_t dataId=0) const |
void | logData (const size_t logSlot) |
Copy current data vector into log storage at given logslot. | |
int | getNumberOfPortsByType (const int type) const |
Returns the number of attached ports of a specific type. | |
size_t | getNumConnectedPorts () const |
bool | isConnectedToPort (const Port *pPort) const |
Port * | getSortOrderSourcePort () const |
Component * | getWritePortComponentPtr () const |
Returns a pointer to the component with the write port in the node. If connection is ok, any node can only have one write port. If no write port exists, a null pointer is returned. | |
ComponentSystem * | getOwnerSystem () const |
Returns a pointer to the ComponentSystem that own this Node. | |
Protected Member Functions inherited from Node | |
void | setNiceName (const HString &rNicename) |
void | setDataCharacteristics (const size_t id, const HString &rName, const HString &rShortname, const HString &rQuantityOrUnit, const NodeDataVariableTypeEnumT vartype=DefaultType) |
Set data name and unit for a specified data variable. | |
void | copyNodeDataValuesTo (Node *pOtherNode) const |
Copy variable values from this to pNode. | |
virtual void | copySignalQuantityAndUnitTo (Node *pOtherNode) const |
void | preAllocateLogSpace (const size_t nLogSlots) |
Pre allocate memory for the needed amount of log data. | |
double * | getDataPtr (const size_t data_type) |
Protected Attributes inherited from Node | |
HString | mNiceName |
std::vector< NodeDataDescription > | mDataDescriptions |
std::vector< double > | mDataValues |
A hydraulic node.