Conversion routines and string manipulation routines.  
More...
#include <stdint.h>
#include "../../../../libraries/scpi-parser/inc/scpi/types.h"
Go to the source code of this file.
 | 
| size_t  | SCPI_UInt32ToStrBase (uint32_t val, char *str, size_t len, int8_t base) | 
|   | Converts unsigned 32 bit integer value to string in specific base.  
  | 
|   | 
| size_t  | SCPI_Int32ToStr (int32_t val, char *str, size_t len) | 
|   | Converts signed 32 bit integer value to string.  
  | 
|   | 
| size_t  | SCPI_UInt64ToStrBase (uint64_t val, char *str, size_t len, int8_t base) | 
|   | Converts signed/unsigned 64 bit integer value to string in specific base.  
  | 
|   | 
| size_t  | SCPI_Int64ToStr (int64_t val, char *str, size_t len) | 
|   | Converts signed 64 bit integer value to string.  
  | 
|   | 
| size_t  | SCPI_FloatToStr (float val, char *str, size_t len) | 
|   | Converts float (32 bit) value to string.  
  | 
|   | 
| size_t  | SCPI_DoubleToStr (double val, char *str, size_t len) | 
|   | Converts double (64 bit) value to string.  
  | 
|   | 
Conversion routines and string manipulation routines. 
 
◆ SCPI_LongToStr
      
        
          | #define SCPI_LongToStr | 
          ( | 
           |           val,  | 
        
        
           | 
           | 
           |           str,  | 
        
        
           | 
           | 
           |           len,  | 
        
        
           | 
           | 
           |           base ) | 
        
      
 
Value:
size_t SCPI_Int32ToStr(int32_t val, char *str, size_t len)
Converts signed 32 bit integer value to string.
Definition utils.c:141
 
 
 
 
◆ SCPI_DoubleToStr()
      
        
          | size_t SCPI_DoubleToStr  | 
          ( | 
          double |           val,  | 
        
        
           | 
           | 
          char * |           str,  | 
        
        
           | 
           | 
          size_t |           len ) | 
        
      
 
Converts double (64 bit) value to string. 
- Parameters
 - 
  
    | val | double value  | 
    | str | converted textual representation  | 
    | len | string buffer length  | 
  
   
- Returns
 - number of bytes written to str (without '\0') 
 
 
 
◆ SCPI_FloatToStr()
      
        
          | size_t SCPI_FloatToStr  | 
          ( | 
          float |           val,  | 
        
        
           | 
           | 
          char * |           str,  | 
        
        
           | 
           | 
          size_t |           len ) | 
        
      
 
Converts float (32 bit) value to string. 
- Parameters
 - 
  
    | val | long value  | 
    | str | converted textual representation  | 
    | len | string buffer length  | 
  
   
- Returns
 - number of bytes written to str (without '\0') 
 
 
 
◆ SCPI_Int32ToStr()
      
        
          | size_t SCPI_Int32ToStr  | 
          ( | 
          int32_t |           val,  | 
        
        
           | 
           | 
          char * |           str,  | 
        
        
           | 
           | 
          size_t |           len ) | 
        
      
 
Converts signed 32 bit integer value to string. 
- Parameters
 - 
  
    | val | integer value  | 
    | str | converted textual representation  | 
    | len | string buffer length  | 
  
   
- Returns
 - number of bytes written to str (without '\0') 
 
 
 
◆ SCPI_Int64ToStr()
      
        
          | size_t SCPI_Int64ToStr  | 
          ( | 
          int64_t |           val,  | 
        
        
           | 
           | 
          char * |           str,  | 
        
        
           | 
           | 
          size_t |           len ) | 
        
      
 
Converts signed 64 bit integer value to string. 
- Parameters
 - 
  
    | val | integer value  | 
    | str | converted textual representation  | 
    | len | string buffer length  | 
  
   
- Returns
 - number of bytes written to str (without '\0') 
 
 
 
◆ SCPI_UInt32ToStrBase()
      
        
          | size_t SCPI_UInt32ToStrBase  | 
          ( | 
          uint32_t |           val,  | 
        
        
           | 
           | 
          char * |           str,  | 
        
        
           | 
           | 
          size_t |           len,  | 
        
        
           | 
           | 
          int8_t |           base ) | 
        
      
 
Converts unsigned 32 bit integer value to string in specific base. 
- Parameters
 - 
  
    | val | integer value  | 
    | str | converted textual representation  | 
    | len | string buffer length  | 
    | base | output base  | 
  
   
- Returns
 - number of bytes written to str (without '\0') 
 
 
 
◆ SCPI_UInt64ToStrBase()
      
        
          | size_t SCPI_UInt64ToStrBase  | 
          ( | 
          uint64_t |           val,  | 
        
        
           | 
           | 
          char * |           str,  | 
        
        
           | 
           | 
          size_t |           len,  | 
        
        
           | 
           | 
          int8_t |           base ) | 
        
      
 
Converts signed/unsigned 64 bit integer value to string in specific base. 
- Parameters
 - 
  
    | val | integer value  | 
    | str | converted textual representation  | 
    | len | string buffer length  | 
    | base | output base  | 
  
   
- Returns
 - number of bytes written to str (without '\0')