added locations, controllers and variables
parent
60b9b2c981
commit
383ae4fa8e
@ -0,0 +1,42 @@
|
|||||||
|
local entity = import '../lib/entity.libsonnet';
|
||||||
|
|
||||||
|
entity
|
||||||
|
{
|
||||||
|
'$id': 'https://picc.app/schemata/v0.1-dev/controller',
|
||||||
|
title: 'Controller',
|
||||||
|
description: 'Describes a relationship between two entities.',
|
||||||
|
|
||||||
|
properties+: {
|
||||||
|
module: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'Module name of the controller.',
|
||||||
|
},
|
||||||
|
arg: {
|
||||||
|
description: 'Additional arguments. Can be any JSON type.',
|
||||||
|
},
|
||||||
|
entities: {
|
||||||
|
type: 'array',
|
||||||
|
description: 'Entities this controller controls.',
|
||||||
|
items:
|
||||||
|
$.properties.id,
|
||||||
|
},
|
||||||
|
measures: {
|
||||||
|
type: 'array',
|
||||||
|
description: 'List of variables this controller measures.',
|
||||||
|
items: 'string',
|
||||||
|
minItems: 1,
|
||||||
|
uniqueItems: true,
|
||||||
|
},
|
||||||
|
controls: {
|
||||||
|
type: 'array',
|
||||||
|
description: 'List of variables this controller controls.',
|
||||||
|
items: 'string',
|
||||||
|
minItems: 1,
|
||||||
|
uniqueItems: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
required+: [
|
||||||
|
'module',
|
||||||
|
'entities',
|
||||||
|
],
|
||||||
|
}
|
@ -1,7 +1,7 @@
|
|||||||
local loom = import 'lib/loom.libsonnet';
|
local loom = import 'lib/loom.libsonnet';
|
||||||
|
|
||||||
loom.weave(import 'src/entity.jsonnet') +
|
loom.weave(import 'src/entity.jsonnet') +
|
||||||
loom.weave(import 'src/room.jsonnet') +
|
loom.weave(import 'src/locations/room.jsonnet') +
|
||||||
loom.weave(import 'src/relationship.jsonnet') +
|
loom.weave(import 'src/relationship.jsonnet') +
|
||||||
loom.weave(import 'src/devices/light.jsonnet') +
|
loom.weave(import 'src/devices/light.jsonnet') +
|
||||||
loom.weave(import 'src/devices/sensor.jsonnet')
|
loom.weave(import 'src/devices/sensor.jsonnet')
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
local loom = import 'lib/loom.libsonnet';
|
local loom = import 'lib/loom.libsonnet';
|
||||||
|
|
||||||
loom.tangle(import 'src/entity.jsonnet') +
|
loom.tangle(import 'src/entity.jsonnet') +
|
||||||
|
loom.tangle(import 'src/relationship.jsonnet') +
|
||||||
|
loom.tangle(import 'src/controller.jsonnet') +
|
||||||
|
|
||||||
|
loom.tangle(import 'src/variables/real.jsonnet') +
|
||||||
|
|
||||||
loom.tangle(import 'src/locations/room.jsonnet') +
|
loom.tangle(import 'src/locations/room.jsonnet') +
|
||||||
loom.tangle(import 'src/locations/building.jsonnet') +
|
loom.tangle(import 'src/locations/building.jsonnet') +
|
||||||
loom.tangle(import 'src/locations/site.jsonnet') +
|
loom.tangle(import 'src/locations/site.jsonnet') +
|
||||||
|
|
||||||
loom.tangle(import 'src/relationship.jsonnet') +
|
|
||||||
loom.tangle(import 'src/devices/light.jsonnet') +
|
loom.tangle(import 'src/devices/light.jsonnet') +
|
||||||
loom.tangle(import 'src/devices/sensor.jsonnet')
|
loom.tangle(import 'src/devices/sensor.jsonnet')
|
||||||
|
@ -0,0 +1,34 @@
|
|||||||
|
local entity = import '../lib/entity.libsonnet';
|
||||||
|
|
||||||
|
entity
|
||||||
|
{
|
||||||
|
'$id': 'https://picc.app/schemata/v0.1-dev/variables/real',
|
||||||
|
title: 'Real',
|
||||||
|
description: 'Real-valued variable.',
|
||||||
|
|
||||||
|
properties+: {
|
||||||
|
moreThan: {
|
||||||
|
type: 'number',
|
||||||
|
description: 'Open lower bound on value of variable.',
|
||||||
|
},
|
||||||
|
moreThanEq : {
|
||||||
|
type: 'number',
|
||||||
|
description: 'Closed lower bound on value of variable.',
|
||||||
|
},
|
||||||
|
lessThan: {
|
||||||
|
type: 'number',
|
||||||
|
description: 'Open upper bound on value of variable.',
|
||||||
|
},
|
||||||
|
lessThanEq: {
|
||||||
|
type: 'number',
|
||||||
|
description: 'Closed lower bound on the value of variable.',
|
||||||
|
},
|
||||||
|
distribution: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'Assumed distribution of variable.',
|
||||||
|
enum: ['normal', 'uniform', 'exponential', 'gamma'],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
required+: [
|
||||||
|
],
|
||||||
|
}
|
Loading…
Reference in New Issue