#ifndef XYrouters_INCLUDED #define XYrouters_INCLUDED #include #ifdef WIN32 #ifdef DOEXPORT_SCRIPT #define EXPORT_SCRIPT __declspec(dllexport) #else #define EXPORT_SCRIPT #endif #else #define EXPORT_SCRIPT #endif class XYrouters : public bncs_script_helper { public: XYrouters( bncs_client_callback * parent, const char* path ); virtual ~XYrouters(); void buttonCallback( buttonNotify *b ); int revertiveCallback( revertiveNotify * r ); void databaseCallback( revertiveNotify * r ); bncs_string parentCallback( parentNotify *p ); void timerCallback( int ); private: // Define some sizes for arrays we will need to support programme operation #define LARGEMTX 500 #define MEDIUMMTX 150 #define SMALLMTX 33 bncs_string m_myParam; bncs_string m_instance; bncs_string pkg_mask; // Holds the text string used by the packages router to enable/disable levels in the crosspoint make bncs_string carpkgxpt1; // Holds the comma delimted string for teh CAR source and destination packages. bncs_string p1, p2; // Temporary variables used by the CAR switching processor bncs_config myVals; // Used during read of data from wn_academy.xml // Variables used by the panel switch function. int new_panelid; // Holds the numeric value used in selecting the new panel. int currentPanel; // Holds the id of the current active router panel // Router id's for controlled devices int pkg_router_id; // BNCS driver id for CTA packages router int sdi_router_id; // BNCS driver id for SD-SDI router int aud_router_id; // BNCS driver id for CTA audio router int tc_router_id; // BNCS driver id for CTA timecode router int pal_router_id; // BNCS driver id for Studio A PAL router int car_pkg_names_id; // BNCS driver id for CAR package names int car_pkg_xpoint_id; // BNCS driver id for CAR package content (comma delimited list) int car_sdi_id; // BNCS driver id for CAR sdi router int car_audio_id; // BNCS driver id for CAR audio router // Variable used by the revertive processing function int offset; // Variables used for CTA package routing int pkg_take_count; // This variable holds the number of seconds remaining in the package router TAKE timeout operation int pkg_source_index; // This variable holds the index of the source package that has been selected. Used in conjunction with pkg_source_selected flag. int pkg_destination_index; // This variable holds the index of the destination package that has been selected. Used in conjunction with pkg_dest_selected flag. int pkg_router_size; // Holds the number of sources/destinations in the package router int pkg_undo_source; // Holds the current source such that an UNDO operation can reset to previous used route. // Variables used for sdi video routing int sdi_take_count; // See pkg_xxxx names for explainations of the use of the variables int sdi_source_index; int sdi_destination_index; int sdi_router_size; int sdi_undo_source; // Variables used for audio routing int audio_take_count; // See pkg_xxxx names for explainations of the use of the variables int audio_source_index; int audio_destination_index; int audio_router_size; int audio_undo_source; // Variables used for timecode routing int timecode_take_count; // See pkg_xxxx names for explainations of the use of the variables int timecode_source_index; int timecode_destination_index; int timecode_router_size; int timecode_undo_source; // Variables used for camera status routing int camstat_source_index; int camstat_destination_index; // Variables used for PAL matrix routing int pal_source_index; int pal_destination_index; // Variables used for CAR to CTA package routing int car_take_count; // See pkg_xxxx names for explainations of the use of the most of the variables int car_source_index; int car_destination_index; int car_pkg_router_size; int car_sdi_undo_source; int car_audio_undo_source; int car_sdi_undo_dest; int car_audio_undo_dest; int car_to_cta_pkgid1; // Holds the package id for the first CAR to CTA routes int car_to_cta_sdi1; // Holds the number of the first SDI source in the CAR to CTA routes int car_to_cta_audio1; // Holds the number of the first audio source in the CAR to CTA routes // Flags bool pkg_source_selected; // Names should be mostly self documenting. Set true when selected/enabled bool pkg_dest_selected; bool pkg_take_enabled; bool pkg_undo_enabled; bool pkg_video_level_enabled; bool pkg_audio_level_enabled; bool pkg_key_level_enabled; bool pkg_time_level_enabled; bool pkg_timer_enabled; bool sdi_source_selected; bool sdi_dest_selected; bool sdi_take_enabled; bool sdi_undo_enabled; bool sdi_timer_enabled; bool audio_source_selected; bool audio_dest_selected; bool audio_take_enabled; bool audio_undo_enabled; bool audio_timer_enabled; bool timecode_source_selected; bool timecode_dest_selected; bool timecode_take_enabled; bool timecode_undo_enabled; bool timecode_timer_enabled; bool camstat_source_selected; bool camstat_dest_selected; bool pal_source_selected; bool pal_dest_selected; bool car_source_selected; bool car_dest_selected; bool car_take_enabled; bool car_undo_enabled; bool car_timer_enabled; bool car_video_enabled; bool car_audio_enabled; // Arrays required to store revertives int pkg_state[LARGEMTX]; int sdi_state[MEDIUMMTX]; int audio_state[MEDIUMMTX]; int tc_state[SMALLMTX]; int carsdi_state[SMALLMTX]; // Only store data from 8 crosspoints. carsdi_state[0] is first circuit CAR to CTA sdi source id int caraudio_state[SMALLMTX]; // Local methods void changePanel(bncs_string button); // Change the X-Y router panel in main display void pkgButton(buttonNotify *b); // Process button pushes for the Packages X-Y router void pkg_disable_take(void); // Function to disable the TAKE button on the Packages X-Y panel void pkg_enable_take(void); // Function to disable the TAKE button on the Packages X-Y panel void buildPkgMask(void); // Function to build the mask pattern required by the Package Router void videoButton(buttonNotify *b); // Process button presses for the SDI X-Y router void sdi_enable_take(void); // Function to enable the TAKE button and timer for SDI routing void sdi_disable_take(void); // Function to disable the TAKE button and timer for SDI routing void audioButton(buttonNotify *b); // Process button presses for the audio X-Y router void audio_enable_take(void); // Function to enable the TAKE button and timer for audio routing void audio_disable_take(void); // Function to disable the TAKE button and timer for SDI routing void timecodeButton(buttonNotify *b); // Process button presses for the camera status timecode X-Y router void timecode_enable_take(void); // Function to enable the TAKE button and timer for timecode routing void timecode_disable_take(void); // Function to disable the TAKE button and timer for timecode routing void camerastatusButton(buttonNotify *b); // Process button presses for the camera status X-Y router void palButton(buttonNotify *b); // Process button presses for the PAL router void carButton(buttonNotify *b); // Process button presses for the CAR package router panel void car_enable_take(void); // Function to enable the TAKE button and timer for CAR to CTA routing void car_disable_take(void); // Function to disable the TAKE button and timer for CAR to CTA routing }; #endif // XYrouters_INCLUDED