/*
 * grifo_ctrlink.h
 *
 */

#ifndef GRIFO_CTRLINK_H_
#define GRIFO_CTRLINK_H_


namespace grifo_fw
{

enum ctrlink_board_address_t
{
    ctrlink_dc_1=7,
    ctrlink_dc_2,
    ctrlink_dc_3,

    ctrlink_synth,

    ctrlink_exciter,

    ctrlink_all=1000
};

enum ctrlink_pingpong_t
{
    ctrlink_pingpong_aynch=0,
    ctrlink_pingpong_a=1,
    ctrlink_pingpong_b=2,
    ctrlink_pingpong_auto
};


class ctrlink_blob_t;	//fowrard declaration

enum ctrlink_instance_id_t {
    ctrlink_receiver_instance=0,
    ctrlink_exciter_instance,

    ctrlink_num_instance
};

void ctrlink_rcv_initialize_raw_default_blob(void*);
void ctrlink_exc_initialize_raw_default_blob(void*);

void ctrlink_initialize_default_blob(grifo_fw::ctrlink_instance_id_t id, ctrlink_blob_t* ld);

extern int ctrlink_clear(ctrlink_blob_t* ld);

extern unsigned int ctrlink_used_size(ctrlink_blob_t* ld);

extern ctrlink_blob_t*& ctrlink_receiver_bus;
extern ctrlink_blob_t*& ctrlink_exciter_bus;

}//namespace

#endif /* GRIFO_CTRLINK_H_ */
