This class is used as a base class of all objects and items, be it cameras, audio sources or plug-in developed objects. For simple Items that does not have any Children this base class itself can be used, often though you will need to implement a class that inherit from this Item and make overrides to GetChildren, HasChildren, GetParent and perhaps more methods.
More...
|
virtual bool | Contains (String searchString) |
| Looks through all fields for a match.
|
|
virtual List< Item > | GetChildren () |
| Return a list of Children of this Item. Implementation not required.
|
|
virtual void | GetChildrenAsync (AsyncItemsHandler asyncItemsHandler, Control control, object callerReference) |
| Initiates a call to retrieve all Children for the item. The AsyncItemHandler will be called with the result.
|
|
virtual List< Item > | GetChildrenSorted () |
| Same as GetChildren, just sorted by name.
|
|
virtual DataSource | GetDataSource () |
| Get the DataSource relevant for this Item type.
If no DataSource is available for this Item, a null value is returned.
This can for instance be used for retrieving Sequence information for a Camera Item.
|
|
virtual Item | GetParent () |
| Get the parent Item to this Item This implementation will build the FQID from the current ServerId and set objectId = ParentId, and assume other fields are the same (FolderType, Kind). If not found it will try with Kind = Kind.Server.
|
|
virtual List< Item > | GetRelated () |
| Return a list of Related Items for this Item.
Could e.g. be Audio devices to a Camera.
|
|
virtual void | GetRelatedAsync (AsyncItemsHandler asyncItemsHandler, Control control, object callerReference) |
| Initiates a call to retrieve all Related items for the item.
The AsyncItemHandler will be called with the result.
|
|
virtual Image | IconWithOverlay () |
| Take item's icon (if available) and place a 'disable' red cross over - if item is disabled.
|
|
virtual Image | IconWithOverlay (bool attention, bool active) |
| Construct an icon with overlay.
|
|
| Item () |
| Create a new Item. The FQID needs to be set afterwards.
|
|
| Item (FQID fqid, String name) |
| Create a new Item including FQID and the items Name. Other properties can be set afterwards.
|
|
| Item (MIPItem mipItem) |
| Construct an Item from the MIPItem retrieved via the Configuration API.
|
|
| Item (ServerId serverId, Guid parentId, Guid objectId, String name, FolderType folderType, Guid kind) |
| Create a new Item. A FQID is created from the provided fields. No further fields needs to be filled to have a valid Item and FQID.
|
|
| Item (ServerId serverId, Guid parentId, String objectIdString, String name, FolderType folderType, Guid kind) |
| Create a new Item. A FQID is created from the provided fields. No further fields needs to be filled to have a valid Item and FQID.
|
|
| Item (ServerId serverId, String name) |
| Create a new Item, a FQID containing the ServerId is created.
Important: You will need to fill the FQIDs parentId, ObjectId or ObjectString and Kind afterwards.
|
|
| Item (ServerId serverId, String name, FolderType folderType, Guid kind) |
| Create a new Item. A FQID is created from the provided fields. Important: You will need to fill the FQIDs ObjectId or ObjectIdString afterwards to have a valid FQID.
|
|
String | Serialize () |
| Serialize the content of the Item, that is independent of Environment and User.
Note: Overloaded properties, UserContext and Authentication will not be saved.
|
|
void | Serialize (XmlWriter xmlWriter) |
| Serialize the content of the Item, that is independent of Environment and User.
Note: Overloaded properties, UserContext and Authentication will not be saved.
|
|
virtual void | SetChildren (List< Item > children) |
| This method can be used when the base Item class is used, and it contains children. This method will NOT add the children to any servers or configuration, but is merely to simplify instantiation. The children set in this method could be retrieved by the GetChildren method. You should only use this way of implementing an Item, if the number of children is limited.
|
|
override String | ToString () |
| Returns the name of the item. Can be used for adding the Item directly on ListBox's and other user controls.
|
|
|
virtual Dictionary< String, String > | Authorization [get] |
| Returns a set of strings identifying what the current user is authorized to do.
|
|
virtual Collection< MapAlarmContextMenu > | ContextMenu [get, set] |
| Defines a list of ContextMenu items relevant for this item. It is displayed when a user right click on a Map containing this item.
|
|
virtual bool | Enabled [get, set] |
| Interpret the properties dictionary for "Enabled" and "Disabled" keys. If no entry is found, default is enabled. Otherwise values of "Yes"/"No" and "True" / "False" are checked for each.
|
|
virtual bool | Encrypt [get, set] |
| Identify if the properties of the item should be stored encrypted on the server.
|
|
virtual FQID | FQID [get, set] |
| The Fully Qualified ID of this Item.
|
|
virtual HasChildren | HasChildren [get, set] |
| Inform if this Item contains children. If the property is no, then no children should be available. If the property is yes, there will normally be children, but it is not a requirement. This property is used to improve the UI when displaying TreeView controls to avoid the (+) plus sing for expanding items, that does not have any children.
|
|
virtual HasRelated | HasRelated [get, set] |
| Inform if this Item contains children. If the property is no, then no children should be available. If the property is yes, there will normally be children, but it is not a requirement.
This property is used to improve the UI when displaying TreeView controls to avoid the (+) plus sing for expanding items, that does not have any children.
|
|
virtual Image | Icon [get, set] |
| Icon used for ViewAndLayout items in the Smart Client.
The Icon represent a given layout.
|
|
virtual Guid | MapIconKey [get, set] |
| Identified what Icon to display on the Map.
A value of Guid.Empty or this Items Kind will use the default MapIcon on the ItemNode.
Otherwise the value is the key into the MapIconDictionary on the ItemNode class.
Please note that MIP items on Map supports dynamic change but MIP Items on Smart Map do not.
|
|
virtual String | Name [get, set] |
| The Display Name of this Item.
|
|
virtual PositioningInformation | PositioningInformation [get, set] |
| Will retrieve the gis location and other positioning information for this Item.
|
|
virtual Dictionary< String, String > | Properties [get] |
| Returns a set of selected properties for the Item. Can also return null, if implementation has no relevant properties for this type of Item.
For built-in items, the available properties depends on the Kind of item, where it is accessed (e.g. Management Client/Application or Smart Client/Standalone).
A item containing a Camera, Recorder or a Server contains the most properties.
|
|
This class is used as a base class of all objects and items, be it cameras, audio sources or plug-in developed objects. For simple Items that does not have any Children this base class itself can be used, often though you will need to implement a class that inherit from this Item and make overrides to GetChildren, HasChildren, GetParent and perhaps more methods.
An item is identified by a FQID.
Only very few fields and methods are defined on an Item.
The Name is the user defined name of the Item, usually entered by an administrator, in a few items the internal Id and Name are the same, e.g. Presets.
The Properties Dictionary contains a set of properties, and it is up to the implementer of a given Item to choose what fields to expose. If your plug-in does not have any relevant field, the Properties property can be empty. All keys and values are Strings. Keys are suggested to be letters only, first character in word to be capital, rest lowercase.
Multi-word keys should uppercase each start of a new word with no space or special character in between. Already abbreviated words may be kept in capital, e.g. "IPAddress".
If the Item knows that no children are present, the HasChildren property is set to HasChildren.No. If Item does not know yet how many children are present, the HasChildren should be set to HasChildren.Maybe, and during the GetChildren or GetChildrenAsync call it is allowed to return an empty list. The GetChildren and GetChildrenAsync returns a list of children Items.
Related property is used to provide a list of relevant related Items, e.g. a Camera can have a microphone and a speaker as related Items. An access control device can have a camera as a related Item.
Note: Presets for a camera are accessed as children to the camera Item (And not as related Items).
A plug-in defined Item is managed by the plug-ins own ItemManager.
When implementing your own plug-in defined Items based on this Item, please note that the MIP Environment functions for serializing and deserializing Items only handles the fields defined in this base class. If you select to save your configuration on a Milestone server, then ONLY store extra fields in the properties Dictionary, to ensure serialize and deserialize will contain all fields. New methods can then be implemented to ease access to the fields stored in the Dictionary.
virtual Dictionary<String, String> VideoOS.Platform.Item.Properties |
|
get |
Returns a set of selected properties for the Item. Can also return null, if implementation has no relevant properties for this type of Item.
For built-in items, the available properties depends on the Kind of item, where it is accessed (e.g. Management Client/Application or Smart Client/Standalone).
A item containing a Camera, Recorder or a Server contains the most properties.
Sample: A camera item retrieved in a standalone application, could be: PTZ : Yes
PTZCenter = No
PTZRectangle = Yes
PTZHome = Yes
pan = Absolute
tilt = Absolute
zoom = Absolute
In the Management Client / Application the following can be used:
Enabled = Yes (or No)
A camera accessed from within the management client/application will also contain information about storage, path to disk and more.
To get a full set of properties, please run the configuration dump sample, or check the ItemProperties class.
For configuration for integration defined Items, be aware that the term "FQID" is reserved and must not be used as the name of a property nor as the beginning of a name of a property in the dictionary.