Difference between revisions of "Category:Model"
From PhotoVoltaic Logger new generation
m |
m (→Model hierarchy) |
||
(16 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
There are in general 4 different model types: | There are in general 4 different model types: | ||
+ | |||
* '''[[Direct models]]''' which stores their data directly and can't have sub channels (e.g. [[Direct models#Sensor|Sensor]], [[Direct models#Meter|Meter]]) | * '''[[Direct models]]''' which stores their data directly and can't have sub channels (e.g. [[Direct models#Sensor|Sensor]], [[Direct models#Meter|Meter]]) | ||
* '''[[Proxy models]]''' with exact 1 sub channel for readout (e.g. [[Proxy models#SensorToMeter|SensorToMeter]], [[Proxy models#Calculator|Calculator]]) | * '''[[Proxy models]]''' with exact 1 sub channel for readout (e.g. [[Proxy models#SensorToMeter|SensorToMeter]], [[Proxy models#Calculator|Calculator]]) | ||
* '''[[Grouping models]]''' which merges always sub channel data (e.g. [[Grouping models#Accumulator|Accumulator]], [[Grouping models#Differentiator|Differentiator]], [[Grouping models#Average|Average]])<br />(Sub channels can be all kind of '''readable models''' again) | * '''[[Grouping models]]''' which merges always sub channel data (e.g. [[Grouping models#Accumulator|Accumulator]], [[Grouping models#Differentiator|Differentiator]], [[Grouping models#Average|Average]])<br />(Sub channels can be all kind of '''readable models''' again) | ||
− | * '''[[Special models]]''' provide internal calculated data(e.g. [[Grouping models#Daylight|Daylight]]) | + | * '''[[Special models]]''' provide internal calculated data (e.g. [[Grouping models#Daylight|Daylight]]) |
+ | |||
+ | == Model hierarchy == | ||
+ | |||
+ | [[File:ModelHierarchy.png|800px]] | ||
== General characteristics == | == General characteristics == | ||
Line 17: | Line 22: | ||
* All direct and proxy channels are readable to query their readings. | * All direct and proxy channels are readable to query their readings. | ||
− | * All grouping models are readable (except multi sensors like | + | * All grouping models are readable (except multi sensors like [[SMA Webbox]] or [[Grouping models#JSON|JSON]]) |
(This attribute is held redundant in database for better performance on feature requests.) | (This attribute is held redundant in database for better performance on feature requests.) | ||
Line 23: | Line 28: | ||
* All direct channels are writable to store readings. | * All direct channels are writable to store readings. | ||
− | * No grouping model is writable (except multi sensors like [[SMA | + | * No grouping model is writable (except multi sensors like [[SMA Webbox]] or [[Grouping models#JSON|JSON]]) |
(This attribute is held redundant in database for better performance on feature requests.) | (This attribute is held redundant in database for better performance on feature requests.) | ||
Line 34: | Line 39: | ||
| <tt>0</tt>|| No child channels allowed, almost a direct model | | <tt>0</tt>|| No child channels allowed, almost a direct model | ||
|- | |- | ||
− | | <tt>1</tt> || Exact 1 | + | | <tt>1</tt> || Exact 1 child channel allowed, almost a proxy model |
|- | |- | ||
− | | <tt>2..n</tt>|| Exact | + | | <tt>2..n</tt>|| Exact 2..n child channel allowed, almost a special calculating model |
|- | |- | ||
− | | <tt>-1</tt>|| Unlimited child channels allowed, almost a grouping model | + | | <tt>-1</tt>|| Unlimited child channels allowed, almost a grouping model which uses the data of all of its child channels |
|} | |} | ||
Line 55: | Line 60: | ||
* [[Grouping models#Accumulator|Accumulator]] | * [[Grouping models#Accumulator|Accumulator]] | ||
+ | * [[Grouping models#AccumulatorFull|AccumulatorFull]] | ||
* [[Grouping models#Average|Average]] | * [[Grouping models#Average|Average]] | ||
* [[Grouping models#Differentiator|Differentiator]] | * [[Grouping models#Differentiator|Differentiator]] | ||
Line 61: | Line 67: | ||
* [[Grouping models#InternalConsumption|InternalConsumption]] | * [[Grouping models#InternalConsumption|InternalConsumption]] | ||
* [[Grouping models#Ratio|Ratio]] | * [[Grouping models#Ratio|Ratio]] | ||
+ | * [[Grouping models#Selector|Selector]] | ||
− | These models | + | These models implements an interface for external services to provide data in special formats: |
* [[Grouping models#PVLog|PVLog\Inverter]] | * [[Grouping models#PVLog|PVLog\Inverter]] | ||
Line 79: | Line 86: | ||
* [[Grouping models#SMA\Webbox|SMA\Webbox]] | * [[Grouping models#SMA\Webbox|SMA\Webbox]] | ||
* [[Grouping models#Kaco|Kaco 1 & 2]] | * [[Grouping models#Kaco|Kaco 1 & 2]] | ||
+ | * [[Grouping models#Kostal|Kostal]] | ||
== Special models == | == Special models == |
Latest revision as of 14:12, 5 August 2016
A model implements the direct interface to the database.
They are PHP classes below core/Channel directory.
There are in general 4 different model types:
- Direct models which stores their data directly and can't have sub channels (e.g. Sensor, Meter)
- Proxy models with exact 1 sub channel for readout (e.g. SensorToMeter, Calculator)
- Grouping models which merges always sub channel data (e.g. Accumulator, Differentiator, Average)
(Sub channels can be all kind of readable models again) - Special models provide internal calculated data (e.g. Daylight)
Model hierarchy
General characteristics
A model implements in their sources the following characteristics and interface methods.
Read
- All direct and proxy channels are readable to query their readings.
- All grouping models are readable (except multi sensors like SMA Webbox or JSON)
(This attribute is held redundant in database for better performance on feature requests.)
Write
- All direct channels are writable to store readings.
- No grouping model is writable (except multi sensors like SMA Webbox or JSON)
(This attribute is held redundant in database for better performance on feature requests.)
Childs
Child count | Description |
---|---|
0 | No child channels allowed, almost a direct model |
1 | Exact 1 child channel allowed, almost a proxy model |
2..n | Exact 2..n child channel allowed, almost a special calculating model |
-1 | Unlimited child channels allowed, almost a grouping model which uses the data of all of its child channels |
Graph
Define, if the channel based of this model is usable in charts view. Not all readable models are usable, especially all the models for external services.
Grouping models
Grouping models delegate all data access during storing or readout to their sub channels.
Read only models
These models perform calculations of any kind.
- Accumulator
- AccumulatorFull
- Average
- Differentiator
- DifferentiatorFull
- Group
- InternalConsumption
- Ratio
- Selector
These models implements an interface for external services to provide data in special formats:
Writable, not readable models
These models act like Multi sensors. They have concrete childs channels, which held the measuring data. The measuring data will provided to these models and distributed to their child channels.
Special models
These models perform mostly internal calculations not based on real measuring data.
Pages in category "Model"
The following 5 pages are in this category, out of 5 total.