File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ var MongoStore = require("../../../jsonapi-store-mongodb");
33//var rppHandler = require("../handlers/rppHandler.js");
44const REGEX_LEVEL = / ( ^ C r i t i c a l $ ) | ( ^ I n f o $ ) | ( ^ W a r n i n g $ ) $ / gi;
55const REGEX_ALARM_TYPE = / ( ^ H H $ ) | ( ^ H I $ ) | ( ^ L O $ ) | ( ^ L L $ ) | ( ^ I N V A L I D $ ) $ / gi;
6+ const REGEX_VALUE_TYPE = / ( ^ b o o l $ ) | ( ^ r e a l $ ) | ( ^ i n t e g e r $ ) | ( ^ s t r i n g $ ) $ / gi;
67
78jsonApi . define ( {
89 namespace : "json:api" ,
@@ -41,6 +42,10 @@ jsonApi.define({
4142 value : jsonApi . Joi . any ( ) . optional ( )
4243 . description ( "The current value from the tag in engineering units." )
4344 . example ( "24.5" ) ,
45+ valueType : jsonApi . Joi . string ( ) . trim ( ) . regex ( REGEX_VALUE_TYPE )
46+ . default ( 'real' )
47+ . description ( 'Can only be bool, real, integer or string.' )
48+ . example ( 'bool' ) ,
4449 units : jsonApi . Joi . string ( ) . optional ( )
4550 . description ( "The tag units." )
4651 . example ( "Volts" ) ,
You can’t perform that action at this time.
0 commit comments