47#ifndef EXTERNAL_LINK_STANDARD_H
48#define EXTERNAL_LINK_STANDARD_H
54#include <fhsim/simobject/ExternalLink.h>
67 virtual bool SetMyOutputPort(
const std::string& portName,
const double* portValueArray);
88 const double*
externalPort(
const double T,
const double*
const X,
const int index);
Definition ExternalLinkStandard.h:63
virtual bool SetMyOutputPort(int portIndex, const double *portValueArray)
Gets value of externalobject input port.
virtual const double * GetMyInputPort(const std::string &portName)
Sets value of externalobject output port. Copies values to internal buffer.
int m_numInputPorts
size of all input ports
Definition ExternalLinkStandard.h:96
double ** m_LocalBufferArrays
size of all output ports
Definition ExternalLinkStandard.h:92
int m_numOutputPorts
holds pointers to initialized values
Definition ExternalLinkStandard.h:93
const double ** m_OutputArrays
indexed output port. See PortDefs.h.
Definition ExternalLinkStandard.h:90
virtual int GetOutputPortSize(int portIndex)
Get size of input port.
virtual bool SetMyOutputPortWithCopyWithIndex(const int portName, const double *portValueArray)
Sets value of externalobject output port. Only stores pointer, does NOT copy values.
virtual bool SetMyOutputPortWithCopy(int portIndex, const double *portValueArray)
Sets value of externalobject output port. Only stores pointer, does NOT copy values.
std::map< std::string, int > m_InputPortIndex
maps the names of output ports to index in m_OutputArrays
Definition ExternalLinkStandard.h:98
virtual bool SetMyOutputPortWithCopy(const std::string &portName, const double *portValueArray)
Sets value of externalobject output port. Only stores pointer, does NOT copy values.
int * m_inputPortSize
holds pointers to all input port ISignalPorts
Definition ExternalLinkStandard.h:95
virtual int GetInputPortSize(int portIndex)
Get size of output port.
virtual bool SetMyOutputPortWithIndex(const int portName, const double *portValueArray)
Gets index of externalobject input port.
virtual std::vector< std::string > GetAllOutputPorts()
Get names of all input ports.
ISignalPort ** m_InputPorts
number of outputPorts;
Definition ExternalLinkStandard.h:94
virtual int GetMyInputPortIndex(const std::string &portName)
Get size of output port.
const double * externalPort(const double T, const double *const X, const int index)
Sets value of externalobject output port. Copies values to internal buffer.
static std::recursive_mutex s_Mutex
maps the names of input ports to index in m_InputPorts
Definition ExternalLinkStandard.h:102
virtual std::vector< std::string > GetAllInputPorts()
Gets value of externalobject input port.
std::map< std::string, int > m_OutputPortIndex
number of inputPorts;
Definition ExternalLinkStandard.h:97
int * m_outputPortSize
holds pointers to all output port arrays
Definition ExternalLinkStandard.h:91
virtual ~ExternalLinkStandard()
reads parameters, registers states, input/output ports and shared resources
virtual const double * GetMyInputPort(int portIndex)
Sets value of externalobject output port. Copies values to internal buffer.
virtual int GetOutputPortSize(std::string portName)
Get size of input port.
virtual int GetInputPortSize(std::string portName)
Get names of all output ports.