In P2 Server, the items used to configure the system and the data returned from the system, all have a specific data type that is used. We use a specific data type, rather than just treating everything as a string, so that we can be smarter with the data.
Data types are especially important when defining datasources and attributes. These are some of the different data types that you will encounter:
- Boolean – has two values denoting true or false.
- DateTime – a structure that represents the date and time in UTC.
- Decimal – a number written in decimal notation.
- Duration – a period of time.
- Integer – a whole number that can be positive, negative, or zero.
- String – a sequence of characters.
- EncryptedString – a sequence of characters that has been encrypted.
- Tag – a value from a time series datasource.