43 integer nd,
const std::vector<doublereal>&
v0,
48 InputEvery(ie), InputCounter(ie - 1),
63 pSDE->
Init(
"BufferStreamDrive_base",
uLabel, nd);
105 integer nd,
const std::vector<doublereal>&
v0,
129 std::vector<doublereal>&
143 out <<
" file: " <<
uLabel <<
", buffer stream, type, stl, " <<
iNumDrives <<
";" << std::endl;
150 integer nd,
const std::vector<doublereal>&
v0,
156 m_bOwnsMemory(bOwnsMemory),
182 std::ostringstream os;
183 os <<
"setting buffer pointer in BufferStreamDriveRaw of wrong size (original=" <<
iNumDrives <<
", new=" << n <<
")";
213 out <<
" file: " <<
uLabel <<
", buffer stream, type, raw, owns memory, " << (
m_bOwnsMemory ?
"yes" :
"no" ) <<
iNumDrives <<
";" << std::endl;
227 bool bOwnsMemory(
true);
237 silent_cerr(
"BufferStreamDrive"
238 "(" << uLabel <<
"\"): "
245 unsigned int InputEvery = 1;
249 silent_cerr(
"BufferStreamDrive"
250 "(" << uLabel <<
"\"): "
251 "invalid \"input every\" value " << i
256 InputEvery = (
unsigned int)i;
261 int idrives = HP.
GetInt();
263 silent_cerr(
"BufferStreamDrive"
264 "(" << uLabel <<
"\"): "
265 "illegal number of channels " << idrives
271 std::vector<doublereal>
v0;
274 for (
int i = 0; i < idrives; i++) {
299 InputEvery, pSDE, bOwnsMemory));
virtual ~BufferStreamDrive_base(void)
#define MBDYN_EXCEPT_ARGS
virtual void ServePending(const doublereal &t)
virtual integer GetInt(integer iDefval=0)
BufferStreamDrive(unsigned int uL, const DriveHandler *pDH, integer nd, const std::vector< doublereal > &v0, StreamDrive::Modifier *pMod, unsigned int ie, StreamDriveEcho *pSDE)
StreamDriveEcho * ReadStreamDriveEcho(const DataManager *pDM, MBDynParser &HP)
StreamDrive::Modifier * ReadStreamDriveModifier(MBDynParser &HP, integer nDrives)
BufferStreamDriveRaw(unsigned int uL, const DriveHandler *pDH, integer nd, const std::vector< doublereal > &v0, StreamDrive::Modifier *pMod, unsigned int ie, StreamDriveEcho *pSDE, bool bOwnsMemory)
const DriveHandler * pGetDrvHdl(void) const
std::vector< doublereal > buffer
unsigned int InputCounter
bool bOwnsMemory(void) const
virtual bool GetYesNoOrBool(bool bDefval=false)
void Echo(const doublereal *pbuf, unsigned nChannels)
void SetBufRaw(integer n, const doublereal *p)
const doublereal * GetBufRaw(void)
static Drive * ReadBufferStreamDrive(const DataManager *pDM, MBDynParser &HP, unsigned uLabel)
virtual bool IsKeyWord(const char *sKeyWord)
virtual void Modify(doublereal *out, const void *in) const =0
virtual ~BufferStreamDrive(void)
#define ASSERT(expression)
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
virtual std::ostream & Restart(std::ostream &out) const
virtual Drive * Read(unsigned uLabel, const DataManager *pDM, MBDynParser &HP)
void EchoPrepare(const doublereal *pbuf, unsigned nChannels)
const doublereal * m_pBuffer
std::vector< doublereal > & GetBuf(void)
virtual ~BufferStreamDriveRaw(void)
bool Init(const std::string &msg, unsigned uLabel, unsigned nChannels)
static const std::vector< doublereal > v0
virtual const doublereal * GetBufRaw(void)=0
virtual HighParser::ErrOut GetLineData(void) const
virtual std::ostream & Restart(std::ostream &out) const
const doublereal * GetBufRaw(void)
BufferStreamDrive_base(unsigned int uL, const DriveHandler *pDH, integer nd, const std::vector< doublereal > &v0, StreamDrive::Modifier *pMod, unsigned int ie, StreamDriveEcho *pSDE)
const integer GetBufSize(void) const
virtual doublereal GetReal(const doublereal &dDefval=0.0)