#include #include #include "ssam.h" ssam_cnct_t *c1; ssam_cnct_t *c2; ssam_cnct_t *c3; void* test_comp() { unsigned int val=1, bval=1; double dval=0; for( ;; ) { ssam_write(c1, &bval); ssam_write(c2, &val); val++; ssam_write(c3, &dval); dval += 0.5; ssam_read(c1, &bval); printf("bval = %u\n", bval); ssam_wait(); } return NULL; } int main() { ssam_init(1); c1 = ssam_create_connection("c1", SSAM_BOOL_T); c2 = ssam_create_connection("c2", SSAM_UINT_T); c3 = ssam_create_connection("c3", SSAM_DOUBLE_T); ssam_create_component(test_comp); ssam_start(10, "log"); return ssam_exit(); }