Logo Search packages:      
Sourcecode: hamlib version File versions

static const char * tt565_get_info ( RIG rig  ) 

Get firmware identification, e.g., "Version 1.372".

Parameters:
rig must != NULL
Returns:
firmware identification string or NULL Re-entrancy issue (what else is new?)

Definition at line 878 of file orion.c.

References EOM, rig_debug(), RIG_DEBUG_ERR, RIG_OK, and tt565_transaction().

Referenced by tt565_open().

{
      static char buf[TT565_BUFSIZE];     /* FIXME: reentrancy */
      int firmware_len, retval, i;

      firmware_len = sizeof(buf);   
      retval = tt565_transaction (rig, "?V" EOM, 3, buf, &firmware_len);
      if (retval != RIG_OK || firmware_len < 8) {     
                  rig_debug(RIG_DEBUG_ERR,"%s: ack NG, len=%d\n",
                              __FUNCTION__, firmware_len);
            buf[0] = '\0';
            return buf;
              }
      buf[firmware_len] = '\0';
      
      /* filter out any non-graphic characters */
      for (i=0; i < strlen(buf); i++)
            if (!isgraph(buf[i])) buf[i] = ' ';   // bad chars -> spaces
      return buf;
    }


Generated by  Doxygen 1.6.0   Back to index