#ifndef CTA_CAR_INCLUDED #define CTA_CAR_INCLUDED #include #ifdef WIN32 #ifdef DOEXPORT_SCRIPT #define EXPORT_SCRIPT __declspec(dllexport) #else #define EXPORT_SCRIPT #endif #else #define EXPORT_SCRIPT #endif class CTA_CAR : public bncs_script_helper { public: CTA_CAR( bncs_client_callback * parent, const char* path ); virtual ~CTA_CAR(); void buttonCallback( buttonNotify *b ); int revertiveCallback( revertiveNotify * r ); void databaseCallback( revertiveNotify * r ); bncs_string parentCallback( parentNotify *p ); void timerCallback( int ); private: bncs_string m_myParam; bncs_string m_instance; bncs_string bttn_name; int package_names_id; // BNCS driver ID for CTA package names int package_xpts_id; // BNCS driver ID for CTA Package contents (format xx,yy where xx is video, yy is audio) int video_id; // BNCS driver ID for CTA video matrix int audio_id; // BNCS driver ID for CTA audio matrix int source_pkg_id; // Holds the current active package number, or -1 for no selection int dest_pkg_id; // Holds the current destination package number, or -1 for no selection int dest_btn; // Holds the button number of the active destination, or 0 for no selection int first_video; // Holds the destination id for the first video destination of CTA matrix int first_audio; // Holds the destination id for the first audio destination of CTA matrix int video_tally[9]; // Holds the current video matrix source crosspoint data. Index 0 is unused, index 5 to 8 just in case get more CTA outputs. int audio_tally[9]; // Holds the current audio matrix source crosspoint data. Index 0 is unused. int take_count; // Used by the take timeout processing int undo_video_source; // Used by the UNDO process int undo_audio_source; int undo_video_dest; int undo_audio_dest; bool take_enabled; // Set true when the Take button is enabled bool take_timer_active; // Set true when the take timeout process is active. bool undo_enabled; // Set true when Undo button is active bool video_selected; // Set true when video level should be switched bool audio_selected; // Set true when audio level should be switched // Local methods void extract_xpts(int pkg_id, int database, int *viddest, int *auddest); // Extracts the audio and video crosspoint data for a package void clear_selections(void); // Clear down all current selections void checkTake(void); // See if Take should be enabled or disabled, action as appropriate void doTake(void); // Action the Take button push void do_Undo(void); // Action the Undo button push void clear_undo(void); // Disable UNDO, clear data stores for undo }; #endif // CTA_CAR_INCLUDED