Beebotte data types

When creating a new resource (part of a channel) the user needs to specify the type of data that is expected to be submitted to this resource.When a write request is made (persistent message), Beebotte checks the received against the specified data type and issues an error is they don't match. Beebotte has a number of defined data types as described in the following.

"any"

Indicates that any type of data is accepted. Use this if you don't know the data type your resource will be submitting or if the data type is expected to change.

"number"

This type accepts any numeric value.

"string"

This type accepts any text

"boolean"

This type accepts boolean values (true, false)

"object"

Indicates that any object is accepted. Use this if you don't know the data type your resource will be submitting or if the data type is expected to change. This is equivalent to "any" resource data type.

"function"

This type indicates that the resource is expected to hold function code (javascript) as data. This resource type is not supported yet. It is reserved for future use.

"array"

This type represents an array of Objects

"alphabetic"

This type represents an alphabetic value

"alphanumeric"

This type represents an alphanumeric value

"decimal"

This type represents a decimal value

"rate"

This type represents a rate: that is a value between 0 and 1

"percentage"

This type represents a percentage value (between 0 and 100)

"email"

This type represents an email address.

"gps"

This complex type represents GPS address. It is a JSON object with the following parameters:

  • longitude: Longitude
  • latitude: Latitude

"cpu"

This complex type representes the CPU usage data. It is a JSON object with the following parameters:

  • user: Percentage of the CPU for user processes
  • sys: Percentage of the CPU for system processes
  • nice: Percentage of the CPU processes with priority upgrade nice
  • idle: Percentage of the CPU not used
  • irq: Percentage of the CPU serving interrupts

"memory"

This complex type representes the Memory usage data. It is a JSON object with the following parameters:

  • memtotal: Total memory size in Bytes
  • memfree: Free memory size in Bytes
  • cached: Optional, the Linux Page Cache in Bytes
  • dirty: Optional, Amount of dirty memory in Bytes

"netif"

This complex type representes a network interface activity statistics data. It is a JSON object with the following parameters:

  • rx_bytes: Received data volume in Bytes
  • rx_packets: Received number of packets
  • tx_bytes: Transmitted data volume in Bytes
  • tx_packets: Transmitted number of packets

"disk"

This complex type representes disk (or volume) space usage data. It is a JSON object with the following parameters:

  • size: Total size of a disk volume (disk partition or mount) in Bytes
  • used: Used size of a disk volume (disk partition or mount) in Bytes