94 static std::vector<mbc_nodal_t>
n_mbc;
98 const char *
const host,
unsigned port,
101 unsigned labels,
unsigned rot,
unsigned accels)
111 if (path && path[0]) {
112 std::cout <<
"connecting to path=" << path << std::endl;
114 std::cout <<
"connecting to host=" << host <<
":" << port << std::endl;
118 std::cout <<
"timeout=forever" << std::endl;
120 std::cout <<
"timeout=" << mbc.
mbc.
timeout << std::endl;
124 if (path && path[0]) {
129 }
else if (host && host[0]) {
151 if (
id >=
n_mbc.size()) {
190 std::cerr <<
"mbc_py_nodal_negotiate: unknown reference node orientation" << std::endl;
212 if (mbcp->
nodes > 0) {
242 std::cerr <<
"mbc_py_nodal_negotiate: unknown node orientation " <<
MBC_F_ROT(mbcp) << std::endl;
270 if (
id >=
n_mbc.size()) {
280 if (
id >=
n_mbc.size()) {
290 if (
id >=
n_mbc.size()) {
309 static std::vector<mbc_modal_t>
m_mbc;
313 const char *
const host,
unsigned port,
315 unsigned refnode,
unsigned modes)
325 if (path && path[0]) {
326 std::cout <<
"connecting to path=" << path << std::endl;
328 std::cout <<
"connecting to host=" << host <<
":" << port << std::endl;
332 std::cout <<
"timeout=forever" << std::endl;
334 std::cout <<
"timeout=" << mbc.
mbc.
timeout << std::endl;
338 if (path && path[0]) {
343 }
else if (host && host[0]) {
356 int id =
m_mbc.size();
357 m_mbc.push_back(mbc);
365 if (
id >=
m_mbc.size()) {
392 if (mbcp->
modes > 0) {
408 if (
id >=
m_mbc.size()) {
418 if (
id >=
m_mbc.size()) {
428 if (
id >=
m_mbc.size()) {
#define MBC_F_LABELS(mbc)
int mbc_nodal_get_motion(mbc_nodal_t *mbc)
Get nodal motion from peer.
uint32_t mbc_n_euler_123_size
nodal stuff (partially opaque).
int mbc_py_modal_initialize(const char *const path, const char *const host, unsigned port, int timeout, unsigned verbose, unsigned data_and_next, unsigned refnode, unsigned modes)
uint32_t * mbc_n_d_labels
int mbc_py_nodal_send(unsigned id, int last)
uint32_t mbc_r_omega_size
int mbc_modal_destroy(mbc_modal_t *mbc)
Destroy modal data.
int mbc_nodal_init(mbc_nodal_t *mbc, unsigned refnode, unsigned nodes, unsigned labels, unsigned rot, unsigned accels)
Initialize nodal data.
uint32_t mbc_n_omegap_size
#define MBC_N_D_LABELS(mbc)
int mbc_py_modal_send(unsigned id, int last)
int mbc_py_modal_destroy(unsigned id)
#define MBC_F_ACCELS(mbc)
int mbc_py_modal_recv(unsigned id)
uint32_t mbc_n_k_labels_size
int mbc_py_nodal_recv(unsigned id)
#define MBC_N_OMEGAP(mbc)
uint32_t mbc_r_theta_size
uint32_t mbc_r_omegap_size
uint32_t * mbc_n_k_labels
int mbc_py_modal_negotiate(unsigned id)
#define MBC_R_D_LABEL(mbc)
int mbc_modal_negotiate_request(mbc_modal_t *mbc)
Negotiate modal data.
uint32_t mbc_n_omega_size
int mbc_py_nodal_initialize(const char *const path, const char *const host, unsigned port, int timeout, unsigned verbose, unsigned data_and_next, unsigned refnode, unsigned nodes, unsigned labels, unsigned rot, unsigned accels)
int mbc_modal_init(mbc_modal_t *mbc, int refnode, unsigned modes)
Initialize modal data.
Connection data structure (partially opaque)
#define MBC_R_OMEGAP(mbc)
uint32_t mbc_r_d_label_size
uint32_t mbc_n_theta_size
int mbc_nodal_put_forces(mbc_nodal_t *mbc, int last)
Put forces to peer.
#define MBC_R_K_LABEL(mbc)
#define MBC_F_REF_NODE(mbc)
int mbc_unix_init(mbc_t *mbc, const char *path)
Initialize communication using "unix" socket.
int mbc_nodal_negotiate_request(mbc_nodal_t *mbc)
Negotiate nodal data.
static std::vector< mbc_nodal_t > n_mbc
uint32_t mbc_r_k_label_size
int mbc_py_nodal_negotiate(unsigned id)
int mbc_inet_init(mbc_t *mbc, const char *host, short unsigned port)
Initialize communication using "inet" socket.
int mbc_modal_get_motion(mbc_modal_t *mbc)
Get modal motion from peer.
Nodal stuff (partially opaque).
static std::vector< mbc_modal_t > m_mbc
uint32_t mbc_n_d_labels_size
#define MBC_R_EULER_123(mbc)
#define MBC_F_ROT_REF_NODE(mbc)
int mbc_py_nodal_destroy(unsigned id)
#define MBC_N_K_LABELS(mbc)
int mbc_nodal_destroy(mbc_nodal_t *mbc)
Destroy nodal data.
uint32_t mbc_r_euler_123_size
#define MBC_N_EULER_123(mbc)
int mbc_modal_put_forces(mbc_modal_t *mbc, int last)
Put forces to peer.