Commit c9e0f3e6 authored by Claes Sjofors's avatar Claes Sjofors

WebSocketServer server object added

parent 82c17db2
!
! Proview Open Source Process Control.
! Copyright (C) 2005-2017 SSAB EMEA AB.
!
! This file is part of Proview.
!
! This program is free software; you can redistribute it and/or
! modify it under the terms of the GNU General Public License as
! published by the Free Software Foundation, either version 2 of
! the License, or (at your option) any later version.
!
! This program is distributed in the hope that it will be useful
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! GNU General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with Proview. If not, see <http://www.gnu.org/licenses/>
!
! Linking Proview statically or dynamically with other modules is
! making a combined work based on Proview. Thus, the terms and
! conditions of the GNU General Public License cover the whole
! combination.
!
! In addition, as a special exception, the copyright holders of
! Proview give you permission to, from the build function in the
! Proview Configurator, combine Proview with modules generated by the
! Proview PLC Editor to a PLC program, regardless of the license
! terms of these modules. You may copy and distribute the resulting
! combined work under the terms of your choice, provided that every
! copy of the combined work is accompanied by a complete copy of
! the source code of Proview (the version used to produce the
! combined work), being distributed under the terms of the GNU
! General Public License plus this exception.
!
! pwrb_c_websocketserver.wb_load -- Defines the class WebSocketServer.
!
SObject pwrb:Class
!/**
! @Version 1.0
! @Group Servers,NodeConfiguration,Operator
! @Summary Configures a web socket server on a proview node.
! The WebSocketServer object defines a web socket server on a proview node.
!
! The existence of a WebSocketServer object in a node will cause a
! server process (GdhWebSocketServer) to start, which provides the HTML5/javascript
! interface with information from the realtime database.
!
! @b See also
! @classlink OpPlaceWeb pwrb_opplaceweb.html
!*/
Object WebSocketServer $ClassDef 704
Body SysBody
Attr Editor = pwr_eEditor_AttrEd
Attr Method = pwr_eMethod_Standard
Attr PopEditor = 1
EndBody
Object RtBody $ObjBodyDef 1
Body SysBody
Attr StructName = "WebSocketServer"
EndBody
!/**
! Optional description.
!*/
Object Description $Attribute 1
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
!/**
! @Summary Max number of web connections to the GdhServer process
! Max number of concurrent connections to the GdhServer process.
! Every graph-applet that is displayed, opens a link to the GdhServer
! process. If MaxConnections is exceeded, the connect request will
! be rejected.
!*/
Object MaxConnections $Attribute 2
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
EndBody
EndObject
!/**
! @Summary Number of current connection to the GdhServer process
! Number of current connections to the GdhSever process.
! Every graph-applet opens a link to the GdhServer process. The current
! number of links is displayed in this attribute.
!*/
Object CurrentConnections $Attribute 3
Body SysBody
Attr TypeRef = "pwrs:Type-$Int32"
Attr Flags |= PWR_MASK_STATE
Attr Flags |= PWR_MASK_INVISIBLE
EndBody
EndObject
!/**
! A message created by an ASup or DSup object gets the
! same identity as the supervised object. Messages
! produced in an application by means of mh_ApplMessage
! (see Proview Programmer's Reference Manual) get an
! identity according to the calling parameter EventName.
!
! SelectList specifies the hierarchies from which
! messages are to be sent to the user. Up to 20 different
! hierarchies can be specified. If messages from e.g. a
! Watchdog object in a node will be received, then the
! name of the node will be specified.
!
! Note! If the SelectList is left blank no message at all is
! sent to the user.
!*/
Object EventSelectList $Attribute 4
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
Attr Flags |= PWR_MASK_ARRAY
Attr Elements = 40
EndBody
EndObject
!/**
! Specifies the type of events that are sent to the user.
! If no type is specified, all types av events are sent.
!*/
Object EventSelectType $Attribute 5
Body SysBody
Attr TypeRef = "pwrb:Type-EventTypeMask"
EndBody
EndObject
!/**
! Specifies the maximum number of contemporary alarms in
! the user's alarm list.
! The number should exceed the maximum number of
! concurrent alarms in the system.
! If the limit is exceeded, alarms might be lost.
!*/
Object MaxNoOfAlarms $Attribute 6
Body SysBody
Attr TypeRef = "pwrs:Type-$UInt32"
EndBody
EndObject
!/**
! Specifies the maximum number of contemporary events in
! the user's event list, i.e. the skyline of the events.
! When the number of events exceeds MaxNoOfEvents the
! oldest event disappears from the list.
! To this list events are sent from the message handler
! in respective node. In each node the message handler
! has its own skyline of events (also named MaxNoOfEvents)
! defined by a MessageHandler object. In principle, the
! User object's skyline of events should be selected as å
! MaxNoOfEvents, added up over MaxNoOfEvents in the
! MessageHandler objects in all nodes throughout the
! PROVIEW/R system, or make it simple and assign the
! attribute e.g. 200.
!*/
Object MaxNoOfEvents $Attribute 7
Body SysBody
Attr TypeRef = "pwrs:Type-$UInt32"
Attr Flags = 0
EndBody
EndObject
EndObject
!
! Template for WebSocketServer
!
Object Template WebSocketServer
Body RtBody
Attr MaxConnections = 50
Attr MaxNoOfAlarms = 200
Attr MaxNoOfEvents = 500
EndBody
EndObject
EndObject
EndSObject
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment