diff options
Diffstat (limited to 'servers/gpib_server_lin/src/scope_functions.cpp')
-rw-r--r-- | servers/gpib_server_lin/src/scope_functions.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/servers/gpib_server_lin/src/scope_functions.cpp b/servers/gpib_server_lin/src/scope_functions.cpp index 2d12f9b..d05deb4 100644 --- a/servers/gpib_server_lin/src/scope_functions.cpp +++ b/servers/gpib_server_lin/src/scope_functions.cpp @@ -37,7 +37,7 @@ extern char falpha[1024]; unsigned char scope_raw_screenshot_data[4194304]; -unsigned long scopeScreenWidth (char * scopeType) { +unsigned long scopeScreenWidth (const char * scopeType) { if (strcmp("HP54600OS", scopeType) == 0) { return 512; } @@ -49,7 +49,7 @@ unsigned long scopeScreenWidth (char * scopeType) { } } -unsigned long scopeScreenHeight (char * scopeType) { +unsigned long scopeScreenHeight (const char * scopeType) { if (strcmp("HP54600OS", scopeType) == 0) { return 280; } @@ -61,7 +61,7 @@ unsigned long scopeScreenHeight (char * scopeType) { } } -unsigned long scopeScreenSize (char * scopeType) { +unsigned long scopeScreenSize (const char * scopeType) { if (strcmp("HP54600OS", scopeType) == 0) { return scopeScreenWidth(scopeType)*scopeScreenHeight(scopeType)*3; } @@ -73,7 +73,7 @@ unsigned long scopeScreenSize (char * scopeType) { } } -int gpib_read_binblock(int ud, int max_num_bytes, char * scopeType) +int gpib_read_binblock(int ud, int max_num_bytes, const char * scopeType) { char segarray[4194304]; long array_pointer; @@ -127,7 +127,7 @@ int gpib_read_binblock(int ud, int max_num_bytes, char * scopeType) return 0; } -int scope_get_screenshot_stage2(char * scopeType, int gpibDevice) { +int scope_get_screenshot_stage2(const char * scopeType, int gpibDevice) { long bytestosend; int k; int m; @@ -175,7 +175,7 @@ int scope_get_screenshot_stage2(char * scopeType, int gpibDevice) { } -int scope_get_screenshot(char * scopeType, int gpibDevice) { +int scope_get_screenshot(const char * scopeType, int gpibDevice) { if ((strcmp("HP54600OS", scopeType) == 0) || (strcmp("TDS744AOS", scopeType) == 0)) { printf("[INFO] Getting scope screenshot [Stage 1]\n\r"); if (strcmp("HP54600OS", scopeType) == 0) { @@ -227,7 +227,7 @@ int scope_get_screenshot(char * scopeType, int gpibDevice) { return 1; } -int scope_set_timebase(float desired_timebase, char * scopeType, int gpibDevice) { +int scope_set_timebase(float desired_timebase,const char * scopeType, int gpibDevice) { if ((strcmp("HP54600OS", scopeType) == 0) || (strcmp("TDS744AOS", scopeType) == 0)) { printf("[INFO] Setting scope timebase to %E\n\r", desired_timebase); if (strcmp("HP54600OS", scopeType) == 0) { @@ -260,7 +260,7 @@ int scope_set_timebase(float desired_timebase, char * scopeType, int gpibDevice) } } -int scope_set_volts_div(int desired_channel, float desired_volts, char * scopeType, int gpibDevice) { +int scope_set_volts_div(int desired_channel, float desired_volts,const char * scopeType, int gpibDevice) { if ((strcmp("HP54600OS", scopeType) == 0) || (strcmp("TDS744AOS", scopeType) == 0)) { printf("[INFO] Setting scope volts/div on channel %d to %f\n\r", desired_channel, desired_volts/8); if (strcmp("HP54600OS", scopeType) == 0) { @@ -293,7 +293,7 @@ int scope_set_volts_div(int desired_channel, float desired_volts, char * scopeTy } } -int scope_set_acquisition(int status, char * scopeType, int gpibDevice) { +int scope_set_acquisition(int status,const char * scopeType, int gpibDevice) { if ((strcmp("HP54600OS", scopeType) == 0) || (strcmp("TDS744AOS", scopeType) == 0)) { printf("[INFO] Setting scope run status to %d\n\r", status); if (strcmp("HP54600OS", scopeType) == 0) { @@ -331,7 +331,7 @@ int scope_set_acquisition(int status, char * scopeType, int gpibDevice) { } } -int scope_set_channel_state(int desired_channel, int status, char * scopeType, int gpibDevice) { +int scope_set_channel_state(int desired_channel, int status,const char * scopeType, int gpibDevice) { if ((strcmp("HP54600OS", scopeType) == 0) || (strcmp("TDS744AOS", scopeType) == 0)) { printf("[INFO] Setting channel %d state to %i\n\r", desired_channel, status); if (strcmp("HP54600OS", scopeType) == 0) { @@ -380,7 +380,7 @@ int scope_set_channel_state(int desired_channel, int status, char * scopeType, i } } -int scope_set_trigger_channel(int desired_channel, char * scopeType, int gpibDevice) { +int scope_set_trigger_channel(int desired_channel,const char * scopeType, int gpibDevice) { if ((strcmp("HP54600OS", scopeType) == 0) || (strcmp("TDS744AOS", scopeType) == 0)) { printf("[INFO] Setting scope trigger channel to %d\n\r", desired_channel); if (strcmp("HP54600OS", scopeType) == 0) { @@ -413,7 +413,7 @@ int scope_set_trigger_channel(int desired_channel, char * scopeType, int gpibDev } } -int scope_set_trigger_level(float desired_level, char * scopeType, int gpibDevice) { +int scope_set_trigger_level(float desired_level,const char * scopeType, int gpibDevice) { if ((strcmp("HP54600OS", scopeType) == 0) || (strcmp("TDS744AOS", scopeType) == 0)) { printf("[INFO] Setting scope trigger level to %f\n\r", desired_level); if (strcmp("HP54600OS", scopeType) == 0) { @@ -446,7 +446,7 @@ int scope_set_trigger_level(float desired_level, char * scopeType, int gpibDevic } } -int scope_set_channel_position(int desired_channel, float desired_level, char * scopeType, int gpibDevice) { +int scope_set_channel_position(int desired_channel, float desired_level,const char * scopeType, int gpibDevice) { if ((strcmp("HP54600OS", scopeType) == 0) || (strcmp("TDS744AOS", scopeType) == 0)) { printf("[INFO] Setting scope channel %d level to %f\n\r", desired_channel, desired_level); if (strcmp("HP54600OS", scopeType) == 0) { |