#ifndef B4_CAR_INCLUDED #define B4_CAR_INCLUDED #include #ifdef WIN32 #ifdef DOEXPORT_SCRIPT #define EXPORT_SCRIPT __declspec(dllexport) #else #define EXPORT_SCRIPT #endif #else #define EXPORT_SCRIPT #endif class CAR_B4 : public bncs_script_helper { public: CAR_B4( bncs_client_callback * parent, const char* path ); virtual ~CAR_B4(); void buttonCallback( buttonNotify *b ); int revertiveCallback( revertiveNotify * r ); void databaseCallback( revertiveNotify * r ); bncs_string parentCallback( parentNotify *p ); void timerCallback( int ); private: bncs_string destvideo_id; // Used when fetching video and audio crosspoints from the destination buttons bncs_string destaudio_id; int package_names_id; // BNCS driver id for package names int package_xpts_id; // BNCS driver id for package crosspoint lists. int video_id; // BNCS driver id for SDI router int audio_id; // BNCS driver id for audio router int dest_btn; // ID for active destination button. 0 means no selection int source_pkg; int dest_pkg; int take_count; int dest_vid[5]; // Holds the video crosspoint numbers for the 4 destinations (ignore index 0) int dest_aud[5]; // Holds the audio crosspoint numbers for the 4 destinations (ignore index 0) int current_vid_src[5]; // Holds the current video source for each of the 4 destinations (ignore index 0) int current_aud_src[5]; // Holds the current audio source for each of the 4 destinations (ignore index 0 int undo_video_source; // Holds the video source crosspoint for undo operation int undo_audio_source; // Holds the audio source crosspoint for undo operation int undo_video_dest; // Holds the video destination crosspoint for undo operation int undo_audio_dest; // Holds the audio destination crosspoint for undo operation bool video_enabled; // Flag to show if video layer routeing is enabled bool audio_enabled; // Flag to show if audio layer routeing is enabled bool take_enabled; // Set true if the TAKE button is enabled bool take_timeout_enabled; // Set true if the TAKE timer is active bool undo_enabled; // Set true if the UNDO button is enabled // Local methods void extract_xpts(int pkg_id, int database, int *viddest, int *auddest); void clear_selections(void); void check_take_enable(void); void do_Take(void); void do_Undo(void); void clear_undo(void); }; #endif // B4_CAR_INCLUDED