scpi_numeric.h 1.2 KB

12345678910111213141516171819202122232425
  1. #ifndef SCPI_NUMERIC_H
  2. #define SCPI_NUMERIC_H
  3. #include <stdbool.h>
  4. #include "app/scpi/scpi_base.h" // eScpiStatus_t
  5. #include "app/scpi/scpi_numeric_types.h" // sProcessNumericEntry_t, sStrToken_t, sNumericRange_t
  6. // @processNumericArgument
  7. // Numeric argument validation and conversion function.
  8. // Processes specified SCPI Numeric Parameter (Numeric Program Data) with the most length SCPI_MAX_NUMBER_LENGTH.
  9. // References:
  10. // "7.7.2 <DECIMAL NUMERIC PROGRAM DATA>", [1]
  11. // "7.7.2.2 Encoding Syntax", [1]
  12. // "7.7.4 <NONDECIMAL NUMERIC PROGRAM DATA>", [1]
  13. // "7.7.4.2 Encoding Syntax", [1]
  14. // Parameters:
  15. // @pObj - numeric conversion context;
  16. // @argToken - numeric argument token to process;
  17. // @entityType - SCPI entity type [eScpiEntityType_t] (see @getParsedEntityDetails, 'peEntityType' argument)
  18. // @range - allowed values range structure
  19. // Return:
  20. // - true: parameter processed successfully, the result is stored inside numeric conversion context
  21. // - false: paramenter processing failed.
  22. bool processNumericArgument( sProcessNumericEntry_t * pObj, const sStrToken_t * argToken, uint8_t entityType, const sNumericRange_t * range );
  23. #endif