[r8]: / trunk / json / json-pac / Data Types / JSONVAR / svnobj  Maximize  Restore  History

Download this file

18 lines (17 with data), 6.8 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
{attribute 'pack_mode' := '4'}
{attribute 'reflection'}
{attribute 'symbol' := 'none'}
FUNCTION_BLOCK JSONVAR
VAR
	{attribute 'instance-path'}{attribute 'noinit'}
	_VarNameArray:		ARRAY[1..GPL_JSON.MAX_LEVELS] OF JSONVARNAME;	//variable path as an array. [1] is variable name, [2..x] are higher level structures
	{attribute 'hide'}_InternalValue:		ARRAY[1..GPL_JSON.MAX_VALUE_SIZE+1] OF BYTE;	//value stored internally as an array of bytes
	{attribute 'hide'}_ApplicationLevel:	INT;										//array position which points to the application
END_VAR
VAR_OUTPUT
variable type and size are automatically determined when a value is set, either:
	-with any of the set accessors of the CharString, Boolean, Integer, Number, or Null properties
variable name is set automatically in FB_Init
	-variable name is the JSON name
	"3h", etc.  Workaround is to put an underscore at the beginning of the variable name.  This will
========================================================================================================*)