Home
ATST Document Template - DKIST
Contents
1. This method must add values collected from the custom editor to the fields attribute table and then return the resulting table It is expected that the subclass constructor builds the GUI element for the editor This constructor must accept a unique name for the new instance This name is not displayed but is used to qualify the attribute fields produced by the editor The name must be a single word of alphanumeric characters Custom editors are created in dialog boxes that the user can reach from a button labeled with the label given in the addedi tor method call The results produced by a custom editor are accessible to the widget s editWindow method via the attribute table returned by the JesEdi tWindow s open method call Each field from the custom editor is qualified with the custom editor s name Note that the name set in the custom editor s constructor does not need to match the label given in the addEdi tor method call The standard JES motion control widget makes use of a custom editor to set the slider units and serves as an example of the use of custom editors TN 0089 Rev B Page 47 of 54 Java Engineering Screens User Manual APPENDIX D CUSTOM WIDGET SETS As mentioned in Section 3 2 it is possible to define and use custom widgets sets to augment the standard CSF widget set This appendix provides a quick overview of the integration of a custom widget set into JES DESCRIBING A CUSTOM WIDGET SET Widget
2. Lop tcs tcss i top tcs configstate itop tcs pkmounttrajectory MCS Control ECS Control FOCS Control Charts Figure 10 Engineering screen in edit mode TN 0089 Rev B Page 15 of 54 Java Engineering Screens User Manual Once in edit mode JesWidgets can be moved around by dragging them to the required position or using the arrow keys and resized by dragging one of the displayed pinch points Right clicking on a JesWidget displays a pop up menu that allows the widget to be edited deleted moved forward or pushed back If editing is selected a pop up edit screen appears allowing detailed specification of the widget This same edit screen appears when a Jes Widget is initially created Configuration X Foreground MN Background __ Lockable _ Disabled x 34 y 34 Width 145 Height 84 Attributes sl Show pause resume _ Connection Ok Cancel Figure 11 Edit screen for a Configuration JesWidget It s possible to select a group of Jes Widgets to perform operations on them all To select a group hold down the right mouse button and drag out a rectangle around the widgets that you wish to select Selected JesWidgets will be outlined in red You can add to the current group by left clicking on any other JesWidget If you drag a JesWidget around while a group is selecte
3. is invoked when the button is pressed where the argument consists of all of the attributes taken from all other widgets on the same screen or tab If the return value is a non null non empty string then a modeless dialog is displayed showing that string The button cannot be pressed again until that dialog is closed While the button is activated the background color is changed as a reminder e Name label to display for this instance of the widget e ClassName the full classname of the attached class e preferred if checked size changes are ignored and button sizes itself 6 5 2 Close Button j New HX The close button widget can be used to close its immediately enclosing screen if and only 1f that screen has its own frame In all other circumstances the button is disabled and invisible e Label text displayed on the button default is Close Close TN 0089 Rev B Page 34 of 54 Java Engineering Screens User Manual 6 5 3 Connection Pipe New Archive CPU load _E eds A connection pipe widget connects the pull operation of one connection with the push operation of another connection A check box is provided for activating and deactivating the connection dynamically In the example at left the incoming connection is a shell connection reporting the system load for some computer while the output connection is an archive connection When activated CPU loads are recorded into the
4. lt p gt Instances of this class are usually accessed indirectly through a lt tt gt Connection lt tt gt object lt p gt public class CpuConnection extends JesShellConnection pk Construct an instance of this class but rely on call to superclass lt tt gt initialize lt tt gt to complete the instance public CpuConnection super protected IAttributeTable buildResult String targetName TAttributeTable results new AttributeTable results setFQPrefix targetName String result runCpuCmd targetName results insert new Attribute value result TN 0089 Rev B Page 53 of 54 Java Engineering Screens User Manual pk Run th e return results e shell script and return the result protected String runCpuCmd String targetName String cmd ssh targetName cat proc loadavg Process p Scanner s String val awk print SIN NES ON NS 3 MIO Misc exec cmd new Scanner p getInputStream ue Wis if s hasNextLine value s nextLine p destroy return val O ue split TN 0089 Rev B Page 54 of 54
5. Base Position x mm y mm Y x Size Handset oi 0 2 0 5 10 20 custom F fine Manual Offsets o dx mm dy mm Y XX 8 o Oo Config e Report o Submit Pause Resume Cancel Abort History respond to pause and resume directives The custom configuration widget can be used to build custom displays for constructing Configurations The view shown at the left is a custom configuration widget as used in the TCS engineering screen Setting up a custom configuration widget may require writing some custom Java code although it is also possible to use a JES screen Ifusing a JES screen that screen is executed in run only mode Additional information on writing custom Java panels for use in a custom configuration widget is given in an appendix Submit enable disable the Submit button connection the target Controller Show get enable disable the Get button Show pause resume when checked the pause and resume buttons appear Note that many Controllers do not e Show abort if checked the default then the Abort button appears e Panel Java classname for the custom embedded panel or screen XML file name for an embeddable JES screen TN 0089 Rev B Page 32 of 54 Java Engineering Screens User Manual 6 4 3 Hover Link Similar to the Link Button a Hover Link may be used to open saved JES screens when clicked However
6. connection Only the first field is used e Incoming the incoming monitor connection Only the first field is used TN 0089 Rev B Page 29 of 54 Java Engineering Screens User Manual e Scales a custom editor for adding removing and arranging scales 6 3 13 Radio Box a one O two O three 6 3 14 Slider r 6 3 15 Spinner Lo Spinners EIX a 10830 na E uy o New MX A radio box allows the user to select one of several choices using a sequence of radio buttons An arbitrary value may be assigned to each button That value will be transmitted when that button is selected e connection the target and field to set The selected value is transmitted as the value of the first field described in the connection e configure box allows editing the list of choices A slider can be used to push values out a connection using a JSlider for user input Additionally it can display actual positions received by pulling from a separate connection Values may be integer or real numbers The slider self orients along the longer dimension of the widget e outConnection the connection used for pushing changes Only the first field is used e inConnection the connection used for pulling changes Only the first field is used e Label a label to title the slider e Min the minium value expected e Max the maximum value expected A spinner a
7. headers or any form of text that will not be updated while running When created the following attributes TCS Control can be set Text the text that this label will display Size the size of the text Preferred check this box to automatically set size Foreground the color that the label will be displayed in Font style the text can have a plain or bold appearance 6 1 5 Static Image e The Static Image widget can be used to place images figures etc as decorations on screens Images are automatically scaled to fit the surrounding box The following attributes can be set e Image the location of the image to display TN 0089 Rev B Page 19 of 54 Java Engineering Screens User Manual 6 2 STATUS WIDGETS Status widgets report status information They have no control capabilities When a status widget is placed into a screen that is embedded in some other widget it retains direct status access through its connection and updates at the specified rate for that connection A status widget embedded in some other widget does not update through the surrounding widget s connection 6 2 1 Attribute Table Display New This is a handy engineering tool widget It pulls messages from a connection and displays the whole attribute table comprising the atst tcs lifecyclestate running message Useful for finding out all attributes posted on an event atst tcs health good for example e Connection the t
8. including the type the update rate for pulling messages and any fields of interest JES managers may force connections into any of three execution modes e live the connection is fully functional This is the default mode e readonly the connection s control outgoing methods push submit pause resume abort and cancel are disabled but the incoming methods pull grab still function e programmed the connections methods are all disabled Some widgets alter their appearance depending on the execution mode Most commonly they may display some buttons only in live mode TN 0089 Rev B Page 6 of 54 Java Engineering Screens User Manual Field names are the names of Attributes possibly followed by an optional index e g target 1 The index can be used to identify a specific element of an array valued Attribute If the index is omitted then 0 is assumed As a special case the index is a wildcard that denotes the entire value array of the attribute returned as a single comma separated value string on incoming connections When used with fields in an outgoing connections the index causes the field s value to treated as a comma separated value string that is split across multiple elements in the outgoing attribute s value array An optional format specifier may be added after the name and index The format specifier allows more precise control over the string form displayed for each field The format specifier
9. A ANO 9 34 Lockable Widgets secs coe cet socedacies cutis RS aL An aaa 9 Sd Disabled WidSets co c235 sche RR IN 9 3167 Macros iia ai ees eR EN a dere aed 9 Bil Cl ii A A A eee hay Seas an ae 10 3 8 Color Rules uo tei ei Go es OS oes Qe Ae Ue a nt ee 11 E NN 12 3 10 Text Rule oa a a ten a ea ten AA 12 3 11 CUStOM WId SELCUILOLS dida 12 3 12 Resol ada 12 4 Creating JES Engineering Screens cccccccesseeseeeeeeeeeeeeeeeeeeeseeeeeeeeeeeeeeees 14 5 Editing JES Engineering Screens ccccccesssseeeeeeeeeeeeeeeeseeeeeeeeeeeeeeeeeenees 15 S Tabbed Panel JES Wid S A ee dle he aly eee 17 6 SOS WIA GGUS ar db 18 Gil Decorations WidSets Conroe nien ene en oeer e eae a E eR yee e AAEE E nET EERE 18 E S OC A A E ETE E E T E 18 6 1 2 Program execution mode Warning eeeeseeseesecssecsseceseceseceseeeseeeseeecaeeeaeecaaecsaecsaecaeeaeees 18 6 13 Rectangle nicotina ad 19 OLS Static Text Aini E dara E qecisidd 19 61 57 Static Marca a ee tee ne im hat ee ee 19 6 2 Status Wd Sets wscvisec RN 20 6 2 Attribute Table Display ciclistas is lirios tele 20 02 20 Dynamic BOX ctrl IA oleae ep tecture tinc 20 62 3 Dynamic Circle iss iiss teat tives tasca 20 6 24 Dynamic Image ii A ee ee 21 6 2 3 Dynamic Texts ll de elven sade laica 21 6 2 6 gt Graph Stripchatt ogni ieee teeth tied eee diese atte 21 6 27 Montor Log Messages lili ide ta 22 0 2 8 Progress DTi A EE O seston anit draadesssconeec
10. Java Engineering Screens User Manual APPENDIX F AN EXAMPLE OF A CUSTOM CONNECTION A custom connection extends the suitability of the JES widget set to new domains by allowing developers to define new domain specific connections for use with the existing widgets A custom connection must e implement the atst cs tools jes connect IJesConnection interface and e provide a parameter less default constructor performing any necessary initializations through the public voidinitialize String targetName String rate method While the details of writing a custom connection are beyond the scope of this document an example of a custom connection derived from the atst cs tools jes connect JesShellConnection class is illustrative of the task This connection allows any JES status widget to display any of the three CPU load average readings from a designated host computer package atst ocs uss gui connect import atst cs interfaces IlAttributeTable import atst cs data Attribute import atst cs data AttributeTable import atst cs tools jes connect JesshellConnection import atst cs util Misc import java util Scanner pk A connection suitable for monitoring CPU load on a host lt p gt The target is the name of the host to monitor lt p gt lt p gt The loadavg values 1 min 5 min and 15 min are returned as the first three elements of the attribute named lt tt gt value lt tt gt lt p gt
11. a Hover Link is invisible until the mouse is moved over it at which time the border is highlighted Typically a Hover Link is overlayed on a Decoration or Status widget e Screen the JES screen to open when the link is selected 6 4 4 Nested Screens The nested screen widget allows the insertion of an entire JES screen as a single widget inside another JES screen If the widget is too small to display the entire embedded screen then scroll bars are provided to allow full access to the embedded screen as shown to the left The contents of the embedded testDebugSlider xml Debug atsttcs Category 5 screen cannot be edited while editing the enclosing widget E All screens are given a name the default name is the name of 2 the corresponding screen file 1 O e Screen name name to display for this screen e Screen select the screen to embed 6 4 5 Tabbed Panel This has already been described in section 5 1 TN 0089 Rev B Page 33 of 54 Java Engineering Screens User Manual 6 5 MISCELLANEOUS WIDGETS There are a few miscellaneous widgets 6 5 1 Call Button E New x The call button widget allows the execution of arbitrary code The primary expected use is as a means of validating a screen s values prior to submission The button may have an instance of the atst cs tools jes ICall interface attached The instance method Validate String call IAttributeTable table
12. customized to meet exact needs The remainder of this section gives a quick overview of how a specialized Java panel may be constructed for use with a Custom Attribute Table widget or a Custom Configuration widget A CUSTOM CONFIGURATION PANEL A Custom Configuration widget provides a frame with simple controls for managing a Configuration and monitoring its execution status New Config Report Pause Resume Cancel Abort History TN 0089 Rev B Page 50 of 54 Java Engineering Screens User Manual Within this frame a Custom Configuration widget can wrap any JPanel subclass that implements the atst cs tools jes IJesConfigurationPanel interface For convenience there is an abstract class atst cs tools jes parts JesAbstractConfigurationPanel that provides some of the key functionality required by this interface Itis advisable to subclass JesAbstractConfigurationPanel instead of directly subclassing JPanel The developer is free to design their panel with any features they need The only consideration is that unlike the standard JES widgets there is no provision for altering the parameters of the panel while running JES some other mechanism e g editing the Java code for the panel must be used A few representative examples to complement the one given in the Custom Configuration section are International Earth Rotation and Reference Systems Service Update File Location Update IERS UPD
13. ea te Er eS nE ee es es A ee ENEE 33 6 4 5 Tabbed Panel recni iesieta EE EA AA A AEE 33 6 5 Miscellaneous Widgets s ctcssclescisetelicsatabeldestisdotzsetlsteecettseceets etacetes slzeos stsceetelisocteleldaettecetuss lotazs 34 OSA Calle BUON aae O A AN 34 03 2 Close BUM has epee inte save apelada 34 6 5 3 Connection Pipe setae ee ies eerie ia 35 6 34 HelpsMessage Display cosita iria elated E E toe 35 0 59 Link Button 2cXersscctes Aeetvsecsase ectegecaeenscateescazccnaseceue pete TEER REIA eaae reaa EEEa Eat S 35 A Ela te E A T A 36 Appendix A Creating a New JesWidget an example cccccceeeeeeeeeeeeeeeeeeeeeeeees 37 Appendix B Code LiStiNg cocinan oc 41 Appendix C Adding a custom editor to a new WidGet ccccceeeeeeeeeeeeeeeeeeeeeeeeeees 47 Appendix D Custom Widget Sets cccceeceeseeeeeeeeeeeeeeeeeeeeeneeeeeeeeeeeeeeeeeeeeeeeeeeeeeneees 48 Describing A CUSTOM widget Setrika A ee caret tii a 48 o AAA in eee A E ena Ee Re a E LNE EREE 49 Appendix E Making a Custom Attribute Table or Configuration Widget 50 A Custom Configuration Paneb cia id a a ea ob e es ice sa 50 A Custom Attribute Fable Panel iii A les ici 52 Considerations secs eE EEn EEE E EEE EE e eE ae eer Eeee EREA teense 52 Appendix F An example of a Custom Connection ccccceeeeeeeeeeeeeeeeeeeeeeeeeeeeeeees 53 TN 0089 Rev B Page iv of 2 Java Engineering Screens User Manual 1 INTRODUCT
14. engineering archive By using an event or direct connection as the incoming connection many different items may be recorded in this fashion Only fields named in the outgoing connection that also appear in the values pulled through the incoming connection are passed through the pipe The target of the outgoing connection becomes the source of all attributes passed through the pipe If the live edit mode is selected then right clicking on the widget while the screen is active permits changes to the connections A Connection Pipe works well with an Internal Connection as the outgoing connection to share a single connection with other widgets 6 5 4 Help Message Display 6 5 5 Link Button Name label to display for this instance of the widget In Connection incoming connection Out Connection outgoing connection Live edit enable disable live editing of connections The help widget is a button that when pushed displays an arbitrary message in a dialog box The We all need help sometime But sometimes more than others Close TN 0089 Rev B box remains displayed until closed The help message itself can either be given explicitly in the widget s editor or read from a file HTML text is supported in either case Label text to display on button Use help file reads from file if selected Help file name of help file e Help message text to display if not using a hel
15. positions using different scales e g a science oriented scale such as filter positions or names along with an engineering scale of raw encoder units The thumb button on the slider shows the target position A small rectangle shows the actual position of the device The box is green when the target and actual positions coincide and is yellow otherwise Each connection has two fields the first field is the name of the attribute and optional index into that attribute s array of values if needed that is used for control The 2 field if present is the name of the scale to use when accepting or transmitting values across that connection If the 2 field is missing then the currently selected scale is used A text field is provided for precise positioning when the range of values exceeds the pixel width of the slider A textual display of the actual position is also provided Optionally markers for hard and soft limits may be displayed Any scale may be used to specify those limits Scales may be integer real or string based String based scales are given as labels to display By default those labels will be transmitted and received from connections using that scale However when specifying the labels a mapping to connection values may be given either to numeric values or other strings The format for associating an alternative connection value with a label is label transmitted_value e Outgoing the outgoing control
16. rule matching described above The text rules allow specifying the text of the message as well as its font size font style and color 3 11CUSTOM WIDGET EDITORS When building new widgets it is possible to define new editor fields and add them to the edit windows for those widgets The details for building and using custom editors are beyond the scope of this document but some information is presented in an appendix 3 12 RESOURCES JES uses a number of resources There are several icons used in configurations that must appear in the directory given in the resource path The resource path can be set when the application is started or when it is initialized The default location is SATST resources jes Also various images files are available for use these are located in SATST resources images Screen descriptions created with JES are typically stored in subdirectories of SATST resources screens TN 0089 Rev B Page 12 of 54 Java Engineering Screens User Manual Several properties are used by JesManagers to identify the widgets that are available to that manager The default widget set is found in the property set csf jes This set of property also includes descriptions for the colors that are available for use by JesManagers when constructing screens and descriptions of the standard widget TN 0089 Rev B Page 13 of 54 Java Engineering Screens User Manual 4 CREATING JES ENGINEERING SCREENS Creating an engineering scre
17. sets are described using a set of CSF properties For example the standard CSF widget set is described in the property table cs f jes this property table includes additional properties beyond those used to describe the standard widgets Each widget is described in a separate property The value of a widget property is an array of 2 or 4 values a short description of the widget that is displayed in the widget selection menu the fully qualified classname for the class that implements the widget the preferred width pixels of the widget optional the preferred height pixels of the widget optional the category in which this widget should be displayed in the selection menu The category is used to organize the widgets in the selection menu There are five categories Decoration the widget s purpose is purely decorative Status the widget has no control capability Control the widget can control something may also show status Composite the widget can be used to connect to other widgets or screens Misc any other widget If some other string is entered as the category it is automatically converted to Misc For example here is the property for the standard CSF Text Box widget csf jes JesTextbox gt Text Box atst cs tools jes widgets JesTextBox 150 25 Status An additional property lists all of the widget properties that belong in the widget set These widget property names are automatically extended by
18. 12 Date 4th January 2012 Revision 3 0 A8 Changes New widgets and Connection added TN 0089 Rev B Page i Java Engineering Screens User Manual 12 Date 12th March 2012 Revision 3 0 A9 Changes Wildcard field index support added 13 Date 16th April 2012 Revision 3 0 A10 Changes Custom connection support added 14 Date 20th June 2012 Revision 3 0 A Changes New widget added First formal release 15 Date 1 July 2012 Revision 3 0 B1 Changes Support added for lockable widgets 16 Date 1 October 2012 Revision 3 0 B2 Changes Reformatted document New widgets added 17 Date 10 January 2013 Revision 3 0 B3 Changes Added ability to disable widgets 18 Date 8 April 2013 Revision 3 0 B Changes Minor improvements to some widgets TN 0089 Rev B Page ii Java Engineering Screens User Manual Table of Contents Ms INTOdU CUO IN aan 1 2 Requirements and RUNMMING cccseseeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeaeeeeeeseneeseenenes 1 Deke INC AS 2 Di Din O AO 3 23 Pathe nsec RR aetna E 4 24A O ee ee ea cee ee neti aes 4 3 Special features icsciccessceciccesiseccdsereacesewsasnssedececeseceseranscsieceonesiarenauasecdendeccanerenant 5 Del VOSNENACCOMMECIONS it ia ad it Et ido iaa 5 3 1 1 Configuring an Archive Connection ooooonoccnoconoconocnnonnnonnconncon conocen noc aeien EEEn EEEE NEE cra 7 3 1 2 Configuring a Log Connection riesis ien i ig ii ia iie 8 A Custom A O NS 9 O
19. ATE Config Report Pause Resume Cancel Abort Off AO Calibrate Idle Limb Tracking History Set AO mode to off Set AO mode to calibrate Set AO mode to idle Set AO mode to limb tracking Open Set AO mode to open Closed Set AO mode to closed Config Report Pause Resume Cancel Abort History TN 0089 Rev B Page 51 of 54 Java Engineering Screens User Manual Solar Target Frame Polar Heliographic v O degs ol degs Config Report Submit Pause Resume Cancel Abort History Note that in the first two of these examples the Submit button has been disabled and is not visible These two widgets handle their own submission through the buttons that are provided in the embedded panel Subclasses of JesAbstractConfigurationPanel widget must correctly implement two key methods in the DesConfigurationPanel interface e public void setValue IAttributeTable newValues the Custom Configuration widget passes any Attributes that it receives on to the panel using this method The panel must locate the Attributes it is interested in and extract their values for updating the displayed information e public IAttributeTable getValue the Custom Configuration widget uses this method to obtain all the Attributes that need to be passed out the custom widget s connection or used programmatically A CUSTOM ATTRIBUTE
20. CROS It s possible to use macros when constructing JES engineering screens This allows the altering of names of events or attributes without having to edit screens continuously To use a macro within a JesWidget TN 0089 Rev B Page 9 of 54 Java Engineering Screens User Manual the name of the macro should be used within curly braces and preceded by a dollar sign For example if the macro were called top then it would be used as follows top This text would then be replaced by the macro specified when JES is started up All macros that are used by the JES tool should be specified as part of the command line startup The macros flag can be used to notify JES of macros As an example assume there are two macros top will be replaced by mac1 and bottom will be replaced by mac2 To specify these issue the following command ES macros top macl bottom mac2 Commas must separate the macros and there cannot be any spaces between them The macros can be passed in through an attribute table during initialization if JES has been started from within a container manager Special characters such as blanks commas quotes backslashes and characters syntactically meaningful in XML must be properly escaped It is recommended that any macro definition containing special characters be enclosed in quotes as in JES macros a b c d gt e x y which defines two macros The first named a expands to
21. ION The Java Engineering Screens JES tool has been developed to allow fast construction of engineering screens for applications that use the ATST common services No programming knowledge is required to construct a screen individual parts can be drawn using a mouse Screens can be saved as XML style files so they can be reopened at a later time The JES tool runs as a component and therefore has access to the event service and connection service This means each screen can connect or subscribe and information obtained can be displayed to an operator without the need to program extra applications 2 REQUIREMENTS AND RUNNING The JES tool uses SWING to create the GUI components There are no special requirements for running the JES tool A script is provided for starting JES JES There are several flags that can be issued and these are described below path The path to use for saving and loading JES engineering screens file filename Set this flag to the name of a JES engineering screen that you would like automatically loaded on startup The named screen becomes the JES top level screen Closing the screen terminates JES macros XX Set any macros that are required See the section on Macros for further information rpath The path to where the JES resource files are kept The resource files include the pictures used as icons the file containing a list of widgets and a file containing the current color set See the resources s
22. New _ HX A Check Box widget can be configured to send either a true false value out of a connection or to send a specific arbitrary value out of a connection when checked and a different value when i unchecked This latter mode is called indirect If the value v Enable tracking selected to transmit in indirect mode is empty then no value is transmitted Preferred size the widget to its preferred size Label text to display Use indirect mode determine transmission type Checked value value to send when checked Unchecked value value to send when unchecked Connection outgoing connection Live edit enable disable live editing 6 3 3 Combo Box New The combo box allows the selection of an item from a fixed set of choices 7 e Values the list of choices e Connection the target and field to set Only the first field is set load TN 0089 Rev B Page 25 of 54 Java Engineering Screens User Manual 6 3 4 Component Get Set The Get Set widget is a general purpose interface for transmitting AttributeTables to and from a Component Unlike the other widgets that use JesConnections to communicate this directly connects a Component Attribute names and values may be added and deleted from the displayed AttributeTable Attribute Names Values See se Ser J ES ee ek e Component name of target component e Live edit enable disable live editing 6 3 5 Configur
23. Project Documentation Document TN 0089 Rev B hen Nela vanced technology solar telescope Java Engineering Screens User Manual Alan Greer Observatory Sciences Ltd John Hubbard Steve Wampler ATST Software April 2013 Advanced Technology Solar Telescope 950 N Cherry Avenue Tucson AZ 85719 Phone 520 318 8102 atst nso edu http atst nso edu Fax 520 318 8500 Java Engineering Screens User Manual Revision Summary 1 Date 28 October 2005 Revision 1 0 Changes Initial version 2 Date 12 December 2005 Revision 2 0 Changes Major updates to JES software No longer uses SWT Several widgets added 3 Date 23 December 2005 Revision 3 0 A Changes Added appendix A and B creating widgets Initial document to ATST 4 Date 14 August 2007 Revision 3 0 A 1 Changes Updated for new location of classes 5 Date 28 October 2009 Revision 3 0 A2 Change Updated JesCircle to reflect changes in the code 6 Date 8 July 2010 Revision 3 0 A3 Changes Updated description of resources used by JES 7 Date 18 August 2010 Revision 3 0 A4 Changes Rewritten to match new JES version 8 Date 7 October 2010 Revision 3 0 A4 Changes New widgets added 9 Date 7 December 2010 Revision 3 0 A5 Changes Support for custom widgets 10 Date 15 August 2011 Revision 3 0 A6 Changes New Connections added 11 Date 2 December 2011 Revision 3 0 A7 Changes New widgets and features added
24. TABLE PANEL A custom panel for use with a Custom Attribute Table widget can be constructed in exactly the same way as a panel for a Custom Configuration widget The panels are interchangeable and indistinguishable CONSIDERATIONS While any screen or IJesConfiguration class can be used in a Custom Attribute Table or Custom Configuration widget better results are possible if some thought is put into how the enclosed panel is to behave For example since the panel is executed in read only mode it s possible to configure any individual widgets to pull status values directly from their connections at specific rates This is useful if you want to pull the status values for different widgets from different sources and or at differing rates It s not so useful if you want the status updates to come from a single source and at the same rate In that case it would better to set the individual widget connection pull rates to O and use the enclosing widget s get and or auto get in the case of a Custom Attribute Table to acquire the status updates In general it s probably not a good idea to mix status and control in the same embedded panel although there are certainly exceptions Both the Custom widgets are intended mainly for control The Custom Attribute Table can be configured by hiding the Set button to be a status reporting tool The Custom Configuration widget should never be used as a status only reporting tool TN 0089 Rev B Page 52 of 54
25. User the source to be recorded with each log message Defaults to Console An interactive image responds to mouse clicks on the image This widget is meant to be subclassed into a custom widget Named regions of interest may be defined on the image and actions may be based on the selected region or on absolute positions in the image All positions are given as x y measured from the top left of the image so positions are independent of the scaling of the image Regions of interest are specified as a percent distance from their center Oo used J Connection the target rate and field Only the first field is Image custom editor for image editing Class classname for callback TN 0089 Rev B Page 27 of 54 Java Engineering Screens User Manual The widget s behavior can be customized by attaching an implementation class for the interface atst cs tools jes ICall That class call IAttributeTable table method will be invoked whenever a mouse click occurs in the image The table contains the following attributes The custom editor allows the selection of the image Once the e button which button was pressed 1 2 or 3 for Left Center Right e clickCount number of clicks e modifiers any button modifiers e location the xy mouse positions as percentages from the image s upper left corner e name the name of the location in the image or nul 1 if not at a named location h Open Loo
26. al 6 4 COMPOSITE WIDGETS Composite widgets may be composed of other widgets usually by embedding screens 6 4 1 Custom Attribute Table The custom attribute table widget can be filters xml Filter Selection Filter Wheel A Motion Control H alpha Iron Nickel Chromium Clear Dark h alphal h alpha Filter Wheel B Motion Control Grid Two Clear pin hole pin hole Set Get attribute table widget is provided in an appendix e Show set enable disable the Set button e Show get enable disable the Get button used to build displays for constructing Attribute Tables The resulting display can then be used to set or get the attribute table from a connection The example shown is a custom attribute table widget for adjusting a filter and a mask device The Set button can be used to send the selections to the appropriate component via a set command The Get button fetches the values from that component via a get command updating the display Additional information on writing custom Java panels for use in a custom e Auto get if checked updates for embedded non status widgets are automatically pulled from the connection at the rate specified by the connection and the Set button is disabled e Connection the target connection e Panel Java classname for the embedded custom panel or the screen XML file name for an embeddable JES screen 6 4 2 Custom Configuration
27. all share the common name coude 6 3 9 Lifecycle Health Icon The lifecycle icon widget is a Lifecycle Health Monitor with all displayed text removed It has the same parameters as the monitor widget 6 3 10 Lifecycle Health Monitor Vv New atsttcs a lifecycle running 7 Bx The lifecycle monitor allows the selective monitoring of a component or container s lifecycle state or health status This is a fixed size widget Mode lifecycle or health target name of the target component or container controlEnabled enable disable lifecycle control TN 0089 Rev B Page 28 of 54 Java Engineering Screens User Manual When controlEnabled is set right clicking on the widget when it is in lifecycle mode allows switching among the lifecycle states Deploying aka Loading an object is only possible if its description is known to the AppDB service 6 3 11 Message Button A message button can be used to send a single value out through a connection when it is pressed sf New _oOx e Label label to display on button e Value value to transmit when pushed e Live edit enable disable live editing Reset Filter Wheel 6 3 12 Motion Control COBELELLPRDBDEL oO DDBV LIE OA ISAS The motion control widget allows both mesa the monitoring and control of a single zj Sreem axis motion device Multiple scales ema may be added to the widget to allow the display and setting of
28. arget and update rate the fields are not used e Live Edit enable disable live editing 6 2 2 Dynamic Box j m X The box JesWidget is very simple and used purely for displaying status through connection updates Its internal color can be set through the use of a color rule and so can be updated dynamically as the value of the specified connection field changes e Connection the target update rate and field Only the first field is used e Color the color rules to apply 6 2 3 Dynamic Circle NewTest The circle JesWidget is very simple and used purely for displaying status through connection updates Its internal color can be set through the use of a color rule and so can be updated dynamically as the value of the specified connection field changes e Connection the target update rate and field Only the first field is used e Color the color rules to apply TN 0089 Rev B Page 20 of 54 Java Engineering Screens User Manual 6 2 4 Dynamic Image Mew amp The dynamic image can display different images based on the value of a specified connection field Image rules are used to select the appropriate image to display e Connection the target update rate and field Only the first field is used e Images the image rules to apply 6 2 5 Dynamic Text sf New OX The dynamic text widget can display different text messages with different font sizes font s
29. ation New A Configuration widget can be used to submit a a Configuration to a Controller It offers many E extra features and can be fairly compact no matter Add how many entries are required The left hand side Remove of the JesWidget allows configurations to be LE entered and edited The right hand side shows the A current constructed configuration and has buttons to either apply the configuration or clear it completely Config Report Submit Pause Resume Cancel Abort The drop down box at the top left allows selection of attribute names These attribute names are set in the edit window and there is no limit to how many are present Once the attribute name has been selected the value can be entered into the box below Clicking on Add will enter the attribute into the current configuration and it will be displayed on the right hand side An attribute can be removed from the current configuration by selecting it in the display window and then clicking on the Remove button Configurations can be saved and loaded using the two buttons below the Remove The disk allows you to save your current configuration and the folder will reload a saved configuration Below is a list of attributes that can be set for this JesWidget e Show pause resume if checked then the Pause and Resume buttons appear Note that many Controllers do not respond to pause and resume directives e Show abort if checked the d
30. ayed vertically in a column with the 3 NA 130 Thirty a ability to limit the maximum number of rows 4 VA 140 Forty displayed Unused cells are greyed out and can be A _ ZI marked with optional text e g N A Column names PASTE _ Pause default to the corresponding field names but can be overridden a tool tip for each column header displays the actual field name The order of the fields given in the Connection determines the order of the columns Messages are displayed one at a time as they are received The display can be paused to examine a message in detail subsequent messages are discarded until the display is resumed A timestamp shows the time the current message was received either in long form including the date or short form with just the time If live editing is enabled the table display may be adjusted while executing e MaxRows limit number of rows in display 0 implies no limit The timestamp turns red if any fields have their contents truncated Custom column names enable disable the use of custom column names Names custom column names as a comma separated list If a name is blank use the corresponding field name Short timestamp enable disable use of short form for the timestamp Unused cell text text to place in unused cells Column widths starting widths for each column columns are also dynamically resizable Connection the target rate and fields Live Edit enable display li
31. b c d gt e while the second named x expands to y Macros may be defined as general applied everywhere or screen specific are only applied to a specific named screen Screen specific macros are defined by including the name of the screen as the prefix to the macro name as in ES macros motorl min 100 motor2 min 50 Here the macro min in the screen motor1 expands to 100 while expanding to 50 in screen motor2 Screen specific macros are expanded before general macros are expanded Note that macros have limited utility in setups that make use of nested screens screens embedded in other screens or in other situations where JES is not used to initiate the screen display It is cumbersome and difficult to provide macro definitions in these cases For this reason it is better to consider screens that contain macro names as templates that can be used to generate custom screens where those macro names have been replaced by their definitions JES encourages this view by not allowing you directly save a screen that was created by expanding macros back over the original template screen file This also makes it more difficult to accidently overwrite the template screen file with one that has had macros expanded 3 7 COLORS The foreground color is displayed as black but can be changed if required The JES tool allows specific preferred colors to be quickly selected whenever a color change is offered but any color selection is possibl
32. creens User Manual source the source component for the entry e name the entry name e value the value of the entry Pushes through an archive connection record attribute names and values into the engineering archive Each attribute in the pushed attribute table is recorded as a separate archive entry if the attribute name matches a name specified by the _ name meta field The fully qualified prefix for the incoming attribute table is used as the source of each entry The archive connection operates in two fundamental modes e live mode values are extracted from the archive as they are entered into the archive When pulling from the connection only LIMIT values inserted since the last pull are processed A grab from the connection fetches the most recently archived entry matching the search criteria Omitting the _ start meta field forces live mode e archive mode values are extracted from the historical record in the archive The __ start meta field must be present and valid to use archive mode Values are extracted from the archive starting with the START date and time If the __ stop meta field is present and valid then null is returned for any fetches of entries timestamped after that date and time Each pull grabs up to LIMIT default is 5000 entries A grab fetches the most recently archived entry matching the search criteria 3 1 2 Configuring a Log Connection The target name for a log connection identifies the sou
33. d later in this document Subclasses of JesManager may extend this standard set with additional widgets This allows systems to develop and use widgets that are specific to their problem domain without having to modify CSF itself A short introduction on how to use custom widget sets is provided in an appendix 3 3 LIVE EDITS Some widgets can be configured to support a live edit mode where key functional parameters may be adjusted while the screen is running by pressing ctrl right click on the widget This feature allows the user of the screen to alter the behavior of the widget dynamically For example an engineering screen might supply a Table widget set in live edit mode so the user can select the source of the displayed values so different sources can be monitored as needed The size and position of a widget cannot be altered during live editing 3 4 LOCKABLE WIDGETS All widgets are normally unlocked allowing user interaction with each widget Individual widgets may be marked as lockable when they are edited A lockable widget has its user interaction disabled when a JES screen has been started in locked access mode All widgets are unlocked when the screen s edit mode is enabled 3 5 DISABLED WIDGETS Any widget can be marked as disabled inoperable by the developer This is particularly useful during development when system capabilities are not fully developed The decision to disable a widget is made while editing the widget 3 6 MA
34. d then the whole group will be dragged by the same amount Groups can be aligned left or right and evenly distributed vertically To deselect a group left click on the background of the screen While in edit mode right clicking on the background of a screen opens the screen menu The options available in this menu are to put the screen back into execute mode change the title of the screen save the screen or adjust some edit properties such as display a grid for positioning and enabling snap to grid Also if a Jes Widget has been copied in this screen then the paste option will be available The standard control keys can be used to cut X copy C or paste V a widget or group of widgets Closing the originating screen before pasting a widget causes information about the widget to be lost Paste the widget before closing the originating screen TN 0089 Rev B Page 16 of 54 Java Engineering Screens User Manual 5 1 TABBED PANEL JES WIDGET The tabbed panel is a special kind of widget that requires some extra explanation Creating a Tabbed Panel is the same as creating other widgets a rectangle is dragged out across the screen and the widget selected from the popup menu The difference is when editing the tabbed panel hd Edit Tabbed Pane Edit Tabs Position Error nuthl itop tcs pk topj tes mcs top tcs mcs top tcs mcs ttop tes pk top tcs mcs del top tcs pk C top tcs
35. dinate of the circle in pixels param w width of the circle in pixels param h height of the circle in pixels param box the IJesBox that owns this widget public JesCircle int x int y int w int h IJesBox box int w int h int h 0 Support the programmatic interface getFields No outgoing values TN 0089 Rev B Page 42 of 54 Java Engineering Screens User Manual public void setValue IAttributeTable values String target connect getTarget String fieldName connect getFields 0 String val ConnectionCallback getFieldValue target fieldname values if null val setColorField val Overrides the doReSize in JesWidget This method is called after the user alters the size in edit mode param w new width in pixels param h new height in pixels z public void doReSize int w int h Force widget to be at least 5x5 pixels in size if enforceMinSize w h 5 5 return m_canvas setSize w 2 h 2 public void doDestroy finalize public void finalize if null connect connect breakConnection connect null lt p gt Implements the doGenerateXML method in JesWidget This method will get called whenever the user saves th ngineering box An attribute table will be passed in that contains the x y width and height attributes so they do not need to be se
36. e The set of preferred colors is defined in a property colors in the csf jes Property Table Each color then has its own property in the same property table The current set of colors is TN 0089 Rev B Page 10 of 54 Java Engineering Screens User Manual It is possible to use blinking colors colors that alternate between two separate values The last three Error Warning Moving colors in the above example are blinking colors These colors are no different to normal colors in the way that they can be used but they will continuously alternate between the two values 3 8 COLOR RULES Certain widgets within JES allow color rules to be assigned to them Depending on the value of an attribute received by the widget its color will change To assign color rules click on the color rules button This will open the color rule selection window Choose the color required type in the value that this color should be assigned to and the click on add to add the rule Color rules are specific to individual widgets On the edit window underneath the color rules button the name of the event and attribute to check the values against can be entered Color rules may be matched using simple strings or numeric ranges A range is a string of the form Add Remove M lt 0 0 E 0 0 E gt 1 0 MM 10 1 Figure 6 Color rule editor showing range rules op range where op can be gt
37. e atst ocs uss gui import atst cs tools Jes JesManager public class OcsJesManager extends JesManager public void doInit super dolInit addWidgetSet ocs jes ocsWidgets The JES application can use this JesManager subclass when building screens with JES manager atst ocs uss gui OcsJesManager A custom JesManager subclass is only required when creating instances of non standard widgets the JesManager class can display and manipulate any existing widget instances in a screen regardless of how they were created TN 0089 Rev B Page 49 of 54 Java Engineering Screens User Manual APPENDIX E MAKING A CUSTOM ATTRIBUTE TABLE OR CONFIGURATION WIDGET The Custom Attribute Table and Custom Configuration widgets allow developers to easily construct highly specialized panels for constructing Attribute Tables and Configurations to be set to or gotten from a target component or controller There are two ways to construct these panels e embedding an existing JES screen into the widget e constructing a custom panel in Java Embedding an existing JES screen into one of the custom widgets is straightforward just give the name of the JES screen XML source file when editing the widget The embedded screen is set to READ ONLY mode and all screen update access is done programmatically through the custom widget In the 2 approach experience with Java programming is required but the results may be highly
38. e set correctly The class that needs loading is the atst cs tools jes JesManager class The following attributes must be set TN 0089 Rev B Page 1 of 54 Java Engineering Screens User Manual path The path to use for saving and loading JES engineering screens rpath The path to where the JES resource files are kept The resource files include the pictures used as icons the file containing a list of widgets and a file containing the current color set See the resources section for more details macros Set any macros that are required See the section on Macros for further information file Set this flag to the name of a JES engineering screen that you would like automatically loaded on startup executionMode Set this to JesScreen PROGRAMMED to run the component in programmed mode and JesScreen READONLY to run the component in read only mode accessMode Normally unlocked If set to Locked then all lockable widgets are disabled editable If false screens cannot be edited or saved If the file filename argument is omitted then on startup the operator is presented with the following screen v JES Man File Help Figure 1 JES tool main screen There are four main menu options that can be accessed from the file menu and these are discussed below 2 1 NEw Selecting this option creates a new JES screen and place it into edit mode ready for construction How to populate this engineering scr
39. ection for more details program Run in programmed execution mode In this mode all connections are disabled Aside from use when building screens for planned observing this mode is convenient when building a screen without access to the running components that the screen expects to connect to The default execution mode is live where connections are active readonly Run in read only execution mode In this mode all write methods on connections are disabled but read methods continue to function This is useful for screens where monitoring of devices is needed but actual control of those devices should be disabled The default execution mode is live where connections are fully active edit false Normally JES screens are editable This flag disables the editing and saving of JES screens access locked The normal access mode is unlocked allowing users change values on the screen In locked mode widgets that have been previously marked as lockable have user control disabled The default access mode is unlocked manager classname Allows JES to run using a custom JesManager subclass The default behavior is to use the JesManager class directly The custom manager s fully qualified classname is given as the value of this flag name name Display name in the main window title bar If required JES can be run as a component within a container using a container manager For this to work the DISPLAY environment variable must b
40. eeante 22 6 2 9 Table DisplaYiuoinn asii ileso radar 23 62 107 Table 2D DISplay sie e e EA ri stele a ea 23 62 11 Text BOX smerne NN 24 0 2 12 Text Update cack ireen a E Ae AEE E E e EA EEEE E R E cooks 24 6 3 lt Control Widgets A esses catoursestaduecnsstesttbtoneseetsaceuspentaaeettesuustild syaeestsateuwsotiaabesesstusealdeges 25 63 1 Attribute Tabler srcani nnn i r ni 25 6 3 2 Check BOX caia EE T E ete T O at os EE E E E E 25 6 335 Combo BOX casi ete ee nes Dee ea ae ete ca 25 TN 0089 Rev B Page iii Java Engineering Screens User Manual 6 34 Component Get Seticcaswincic eich laa 26 6 35 Configuration Aei A AA A A a 26 6 3 0 gt Debus Slider its Eea oirlo asnos ENERE NEE 27 631 Enter LoS Messages scudo cat ti tdt dietas 27 6 3 8 Interactive Image uta iaa 27 6 3 9 Luecycle Health leon iii 28 6 3 10 Lifecycle Health MONDOT asenna ennaa e E E E E a E a 28 6 3 11 Message BUTON osrodek eaa keete Ene EONA e e ectepeenselauapeesevensaes tea 29 6 32 Motion Control cio tt dia 29 6 3 13 Radio BOX 00 A GR T Saa 30 6 3 14 Sd in en Rh ae ae it a ias 30 6 39 13 SPIDER alonso 30 63 10 Text ENY ear enee ee A a ias 31 6 4 Composite Widgets cia A A E A E E e Solace tios e 32 6 4 1 Custom Attribute Tables ittessccsesbosteguetssiedeetsccatel eeen niae EER EEE EEEE NEERA 32 6 42 Custom Configuration cui a E A eee 32 64 3 Hover Linkar ennenen e a E E E eh N ele E E n nates 33 6 4 4 Nested Screens iie e
41. een is explained in section 3 There are two modes that an engineering screen can be placed into edit mode and execute mode When in edit mode any items on the screen are not updated and all items can be dragged edited deleted or copied and new items can be placed When in execute mode no editing can take place and all items are updated when required Figure 2 shows a new engineering screen in edit mode Whenever a screen is in edit mode the title bar will contain the title of the screen followed by the word edit placed in brackets When in execute mode this text will not be visible TN 0089 Rev B Page 2 of 54 Java Engineering Screens User Manual Ww New Edit Figure 2 New engineering screen 2 2 OPEN Selecting the open option allows a user to specify an XML formatted document to be used to load a JES engineering screen The screen will be opened and placed into execute mode EY mcs1 xmi PY AzServo xml Py tcs 1 xml Y EcsControlxmi y temp xml PY EcsMcsCharts xml testxml ry ElServo xml G test2 xml Ey es01 xmi D graph xml File Name Files of Type All Files ES Figure 3 Opening a new JES engineering screen TN 0089 Rev B Page 3 of 54 Java Engineering Screens User Manual 2 3 PATH The path option is used to set the path to where all of the JES saved files are kept It is important to set this correctly as opening one screen from another uses the path to search f
42. efault then the Abort button appears e Attributes the list of attribute names that can be set by this configuration e Connection the target rate and fields with default values see Section 3 1 for a description on how Connection fields with default values are used Fields without default values are ignored TN 0089 Rev B Page 26 of 54 Java Engineering Screens User Manual 6 3 6 Debug Slider Debug Slider E Debug atst tcs Category y DEFAULT 4 F E Off Disable 6 3 7 Enter Log Messages The debug slider allows the monitoring and control of a component s debug messaging A log category may be given to affect only those messages in that category All non severe messaging in a category may be disabled as well Moving the slider changes the debug level for the chosen category Also if another source alters the debug level the slider will automatically adjust to show the new debug level e Target name of target component e Orientation vertical default or horizontal slider la New 0X Edit Color Font Style Align Help Clear text Log as Note Warning Severe Cut Copy Paste Bold Italic Looks like clouds are forming to the SouthEast Shut down for week Und Left Cen Right 6 3 8 Interactive Image The log message entry widget allows the user to generate messages to be recorded into the log service e
43. en is very simple Begin by starting JES and selecting New from the file menu This will open a new screen as described in section 2 1 The screen will automatically be placed into edit mode ready for you to draw widgets onto To draw a new widget onto the screen click and hold the left mouse button somewhere on the screen Now drag out the mouse to the required size of the widget As you drag the mouse a rectangle will be drawn showing the outline of the widget Once satisfied with the outline let go of the mouse button and the new widget menu will open New null Edit E Decoration gt Status Control gt Combo Box Composite Component GetSet Misc gt Configuration Custom Configuration Debug Slider Enter log messages Interactive Image Lifecycle Icon Message Button Motion Control Slider Text Entry Figure Creating a new widget Select the desired widget to add it to the screen The widget will be added and the corresponding Edit Window will be opened for the widget From the edit window all of the parameters of the widget can be altered including the width height and x y position so you are not stuck with the original size and position The selected widget can also be moved and resized using the mouse once it has been created Additional individual parameters for each widget are explained in detail in section 6 The exception to the rule for the edit window is the Tabbed Panel widge
44. ering Screens User Manual APPENDIX B CODE LISTING The full source code for JesCircle java is shown here including features that are simplified or omitted in the preceeding discussion Copyright 2008 Advanced Technology Solar Telescope National Solar Observatory Universities for Research in Astronomy Inc under agreement with the National Science Foundation This copy of ATST software is licensed to you under ENSE file included in this SId JesCircle java v 1 20 2010 09 22 13 35 52 swampler Exp operated by the Association of cooperative the terms distribution described in the ATST LIC JesCircle java Created 22 Dec 2005 Author ajg package atst cs tools jes widgets in in in im im im im im im im im in in in in in nport nport nport port port port port port port port port nport nport nport nport nport JesCircle author ajg lt p gt java awt Color java awt Graphics javax swing JPanel atst atst atst atst atst atst atst atst atst atst atst atst atst CS CS CS CS CS CS cs CS CS cS CS CS cS data Attribute data AttributeTable interfaces IAttributeTable services Log tools jes IJesBox tools jes JesAttributeTable tool
45. es timestamp source type message The log message monitor 2013 06 21 18 35 15 761 JES Ea AA E 2013 06 21 18 35 24 737 EventView 2013 06 21 18 35 58 61 AppDbEditor 2013 06 21 18 36 40 948 JES 2013 06 21 18 36 41 014 JES lalarm alarm alarm alarm alarm watches the log service database for new log messages and displays new messages as they arrive The update may be paused to allow scrolling through earlier messages Some messages may be lost while rA rAll doClearAll doClearAll called Filters Source Category id mam C severe Clwaming nose CDebug pan rause Updating is paused e Toggle display of any of the source type category and debug level columns e Filter for any of the log message types alarm severe warning note and debug e Max rows how many messages to keep in the widget s history The default is 200 A value of 0 means no limit but can quickly result in an overwhelming CPU load e Preload count how many old messages to preload into the widget e Source filter log messages so only those from the indicated sources are displayed The default source is all sources e Category filter log messages so only those in the indicated categories are displayed The default is all categories e Live Edit enable disable live edit mode If the log database has many messages in its primary table it can take some
46. ior by avoiding actions when there is nothing to do For example most widgets that use connections do nothing if there is nothing sent or received through the connections 6 1 DECORATION WIDGETS The decoration widgets are not involved in status or control activities They can be used to adorn the cosmetic appearance of a screen For example the Rectangle widget might be placed below a collection of other widgets to visually group them 6 1 1 Clock The clock widget displays a digital clock ticking once a second The time can be shown in either GMT the default or local time and the date can be in either standard YY Y Y MM DD or Julian date YYYY DDD format The size of the font can be scaled scale factors are 1 7 New 2011 02 21 22 38 04 GMT e Scale the font scale factor 1 7 e Format standard or Julian date e localtime if true show local time instead of GMT 6 1 2 Program execution mode warning m x The program mode flag widget simply displays a message when placed into a screen running in programmed execution mode Program Mode e Preferred if true sizes the widget to match text TN 0089 Rev B Page 18 of 54 Java Engineering Screens User Manual 6 1 3 Rectangle 5 The rectangle is purely for aesthetic reasons to group outputs or emphasize text It has no other purpose e Fill color background color of rectangle 6 1 4 Static Text 5 This is used for placing labels
47. k In C images y a a a E 5 cvs 7 Q button seagreen_benji y ATST3x1_72dpi jpg Y ATST5x2_5_300dpijpa Cy atst_cutaway jpg D b_down png D b_minus png Cy b_plus png Ey b_stop png C b_up png D back png Ey bb_reload_ png y button blue_benji_park_01 png D button green_benji_park_01 png y button purple_benji_park_01 png y button red_benji_park_01 png Bi button yellow_benji_p Bi button_blue png y button_green png Fy button_purple png D button_red png y button_seagreen png y button_yellow png Ey nextpng Ey Null png Ey pill button blue_benji Ey pill button green_benj Bi pill button purple_ben Ey pill button red_benji_p y pill button seagreen_tigg 4 m Pi File Name atst cutaway jpg Files of Type Image files ly image is selected regions of interest can be added by clicking on the image You will be prompted for the name of the image and the radius of interest around the selected point Clicking in an existing region allows you to alter the radius of interest or remove the region Multiple regions may share a common name to provide the effect of allowing odd shaped regions There are no limits to the number of named regions of interest The view presented by the custom image editor for the interactive image widget A number of named regions of interest have been added Note that the Coude area is covered by three regions of interest They
48. llows selection of an item from a predefined set The set may be a sequence of integers or real values or an arbitrary set of strings Small arrow keys allow the user to quickly spin through the set of values While spinners are most likely used embedded in some other JES widget it is possible to add a push button as shown in the bottom spinner here for directly pushing the selected value out the widget s Connection Either way the Connection is used to identify the field being targeted by the spinner e Add push button enable the push button e Current value the current default value of the spinner e Numeric Checked if this spinner is a sequence of numbers e Integer Checked if this numeric spinner is a sequence of integers e Minimum Maximum numeric sequence range limits e Step Step size between numeric values in sequence e Choices list of string values if this is a non numeric spinner TN 0089 Rev B Page 30 of 54 Java Engineering Screens User Manual e Connection the target and field to set Only the first field is used 6 3 16 Text Entry A text entry widget can display values received from a connection but may also transmit values out a connection via a push operation The push occurs when a return is pressed inside the text area e Connection the target and field to set Only the first field is set TN 0089 Rev B Page 31 of 54 Java Engineering Screens User Manu
49. mString this conString if null connect connect makeConnection attachCallback return values Canvas Extends JPanel Simple class that overrides the paint method of JPanel and draws our circle in the correct colour author ajg gt private class Canvas extends JPanel public void paint Graphics g super paint g if getMode drawShape g Subclasses may override this method to draw different shapes e public void drawShape Graphics g g g g g setColor m_color fillO0val 0 0 getWidgetWidth 3 getWidgetHeight 3 setColor new Color 0 0 0 dArawOval 0 0 getWidgetWidth 3 getWidgetHeight 3 TN 0089 Rev B Page 46 of 54 Java Engineering Screens User Manual APPENDIX C ADDING A CUSTOM EDITOR TO A NEW WIDGET A new widget may install custom editor controls in its JesEditWindow object using that object s public void addEditor String label atst cs tools jes CustomEditor editor method The custom editor can provide an editor interface for the entire widget or for arbitrary parts of the widget In the latter case more than one editor may be addied but each must be uniquely named and labeled The CustomEditor abstract class extends JPanel and requires implementing subclasses to override the method TAttributeTable doGetFields IAttributeTable fields
50. mcs top tcs mcs top tcs mcs Enclosure Control tOp tCS e0SS top tcs ecss top tcs ecss top tcs ecss Figure 12 Edit screen for a Tabbed Panel In this edit window other widgets can be added deleted moved copied pasted grouped and distributed just as if it were a screen Also from the menu options new tabs can be added tabs can be renamed and tabs can be deleted Be careful when deleting tabs as ALL widgets placed onto the tab will be automatically deleted along with the tab Resizing the tabbed panel is achieved by simply resizing the edit window to the desired size Once satisfied with the tabbed panel close the window and you will return to the main screen On the main screen the tabbed panel can be moved around just like any other widget It is possible to copy widgets or groups of widgets from a screen to a tabbed panel and from a tabbed panel to a screen TN 0089 Rev B Page 17 of 54 Java Engineering Screens User Manual 6 JESWIDGETS This section gives a comprehensive list of the standard JesWidgets what they can do and the attributes they possess The standard parameters lockable width height and xy position are not described here Also many widgets allow selection of one or both of the foreground and background colors The edit window for each widget only displays the color selections allowed for the targeted widget All widgets attempt to optimize their behav
51. mmand The target is the command string and may include pipes Each grab or pull from the connection returns the entire output of the command i e the command is executed anew each time as a single string that is the value of a field named value This is the only field that that can be accessed through the connection The string contains the command s output lines separated by newlines As an example the target ssh weaver df h awk backups print strtonum 5 returns the percent used in a disk partition whose mount point includes the string backups This could be used with a Progress Bar or Strip Chart widget to track available disk space e A null connection a null connection happily and silently does almost nothing It is useful for temporarily disabling a connection for GUI testing e An internal connection that can be used to pass information between two or more widgets in the same JES application This connection is most useful when at least one of the widgets is a Connection Pipe or a custom widget that was developed with sharing information across widgets in mind It is also possible to introduce domain specific custom connections This can often be done by subclassing an existing connection When using a custom connection the full classpath of the implementing class must be provided An example of a custom connection implementation is given in an appendix When configuring a JES widget the user must describe the connection
52. newColor JesColorltem testString m_col val if m color eqals newColor m _ color newColor m_color setComponent m_canvas m_canvas repaint Another method that must be implemented is the editWindow method This is the method that is called whenever the user right clicks on the widget and selects edit while in edit mode This method should open a dialog that lets the user enter all of the required information about the widget There is a class that has been designed to make this as easy as possible called the JesEditWindow The circle creates a new instance of the JesEditWindow and adds all of the necessary items The method addItem adds a text box the method addColourRule adds a color rule and addConnection adds a connection There are other methods available for adding checkboxes radio button groups single colors and others See the code for the JesEditWindow class To open the dialog call the open method This blocks until the user OKs or CANCELs The return value from this method is a JesAttributeTable that can be used in the same way as in the initialise method However in this situation the moving and resizing is not handled automatically so the following calls should always be made TN 0089 Rev B Page 39 of 54 Java Engineering Screens User Manual reSize values getiInt Width values getInt Height doMove values getInt x values getInt y Finally for the circle the p
53. ns available on all connections void push IAttributeTable message push the message out the connection If message is empty then no push occurs void pull JesConnectionCallback callback begin pulling messages from the connection no faster than the specified rate The callback is invoked each time a pull responds to an incoming message Ifa rate of 0 is specified then no pull occurs void IAttributeTable grab grab a single message from the connection and return its message The following connection types are currently supported An event connection the target is the name of the event The rate determines the maximum frequency at which incoming events are processed after a pull command Some events may be discarded if newer events arrive before event processing occurs Pushing messages out an event connection results in an event being posted with that message A direct connection the target is the name of any remote object implementing the Remote interface typically this is a Component or a Controller Pulling messages from a direct connection results get operations on the remote object at the specified rate Pushing messages uses the set operation A control connection the target must be the name of any remote Controller This connection type extends the direct connection operations with the standard command action response directives submit pause resume cancel and abort Only a few widgets require a con
54. od is the opposite of the doGenerateXML method A JesAttributeTable is passed in and from this the widget is initialized For the circle this involves resetting the connection and reconstructing the color rules Also at this point if the connection is valid then the connection is made to the target a callback for responding to messages from the target is created and a pull is initiated on this target TN 0089 Rev B Page 38 of 54 Java Engineering Screens User Manual public void initialize JesAttributeTable att connect Connection fromString att getString connection m col JesColorItem fromString att getString color if null connect connect makeConnection attachCallback public void attachCallback final String fieldName connect getFields 0 if null fieldname JesConnectionCallback cb new JesConnectionCallback public void callback String target IAttributeTable tab String val getFieldValue target fieldname tab if null val doCallback val y connect pull cb The callback method itself is fairly straightforward for the circle Using a helper method defined in JesColorltem it checks to see if the value has changed and if there is a color assigned to that value If there is the color is changed and a repaint of the Canvas is forced public void doCallback String val JesColor
55. or m_col compare val if null newColor amp amp m_color equals newColor m color newColor m_color setComponent m canvas m_canvas repaint Implements the editWindow method in JesWidget This method will get called whenever the user right clicks on the widget and selects edit or when the user creates a new widget This method opens the editing panel allowing the user to alter some or all of the parameters public IAttributeTable editWindow JesEditWindow edit edit setTitle Circle edit addItem x String valueOf getWidgetX edit addItem y String valueOf getWidgetY edit addItem Width String valueOf getWidgetWidth edit addItem Height String valueOf getWidgetHeight edit addConnection Connection connect edit addColourRule Color m_col JesAttributeTable values edit open if values size gt 0 reSize values getInteger Width values getiInteger Height doMove values getInteger x values getInteger y TN 0089 Rev B Page 45 of 54 Java Engineering Screens User Manual m col new JesColorList m col fillFromString values getString Color if null connect connect breakConnection String conString values getString Connection if null conString connect Connection fro
56. or the new screen The path can be set as an absolute path or a relative path It defaults to SATST resources screens and can usually be left alone Enter the path to JES screen files lome ajg workspace atst screens Ok Cancel Figure 4 Setting the path for JES engineering screens 2 4 EXIT This option shuts down the JES component and exits the program TN 0089 Rev B Page 4 of 54 Java Engineering Screens User Manual 3 SPECIAL FEATURES JES provides several useful features in addition to the standard widgets described later 3 1 GENERIC CONNECTIONS Most JES widgets must connect to outside sources either to obtain information for display or to issue control data All JES widgets do so through generic connections Messages may be pushed out of a connection or pulled from a connection A connection is identified by a target that is typically either an event name or the name of a remote object Specific fields e g Attribute names of interest can be associated with the target as well as an update rate The rate determines how frequently values are pulled from the target While all Connections allow you to enter multiple field names many only use the first field and Connections used with those widgets should only define that single field Connection t atst tcs 11000 Close Figure 5 Generic connection editor with two fields specified There are three fundamental operatio
57. p file The link button is used to open saved JES screens from other JES screens without the need to use the main menu The screen to open can be set as an attribute and the JES tool will attempt to open the screen whenever the link button is clicked Label text displayed on the button File name of the JES engineering screen to open Images image rules for optional image on button Page 35 of 54 Java Engineering Screens User Manual e Preferred if this is checked the button will resize to automatically fit the label 7 REFERENCES 1 Steve Wampler ATST Common Services Java Support 29 June 2004 TN 0089 Rev B Page 36 of 54 Java Engineering Screens User Manual APPENDIX A CREATING A NEW JESWIDGET AN EXAMPLE This appendix is written for people who wish to add new widgets to the JesWidget application It outlines all of the steps necessary to create the JesCircle widget The circle widget itself is fairly simple it draws a circle on the screen and fills it with a color The color is chosen using a set of color rules so the circle can be made to change color dynamically The code snippets used here are slightly modified from the actual implementation to simplify the discussion The actual full source code for the JesCircle widget is listed in appendix B The requirements of the circle are as follows It must be able to draw a circle to the screen It needs to establish a connection to get values of in
58. prepending the name of the widget set The index property is used by a subclass of the JesManager class to locate the properties for the widgets in the associated widget set For example the standard CSF widget set is identified through the index property csf jes csfWidgets which has the value JesRectangle JesStaticText JesStaticImage JesCircle JesDynamicImage JesProgressBar JesTextUpdate JesTextEntry JesTextBox JesComboBox JesButton JesTable JesAttributeDisplay JesConfiguration JesTabbedPane JesSlider JesDebugSlider JesGraph JesInteractivelmage JesLinkButton JesScreenWidget JesMotionControl JesLifecycle JesProgramMode Custom widget names should be unique unless they are meant to override existing widgets TN 0089 Rev B Page 48 of 54 Java Engineering Screens User Manual INCLUDING A CUSTOM WIDGET SET A custom widget set can be added to a JesManager subclass by overriding the doInit method And JES can be instructed to use this JesManager subclass using the manager option described in Section 2 The new method should invoke the overridden one to pick up the standard CSF widgets as well as perform a few other initializations For example assuming that the custom widget set is described in the ocs jes property table with index property ocs jes csfWidgets the following JesManager subclass could be used to gain access to this widget set packag
59. rce component or components for log messages of interest It can be a simple component name or a comma separated list of regular expressions identifying the components of interest For example a target name of atst ics visp atst ics vbi would select messages from VBI and ViSP components only The following meta fields are valid for a log connection e __type MESSAGE TYPES this identifies the types s of messages of interest MESSAGE_TYPES may be a comma separated list of alarm debug note warning and severe e __category CATEGORIES select the log categories of interest This can be a single log category name or a common separated list of regular expressions identifying the log categories e _message REGULAR_EXPRESSION a regular expression defining the messages of interest e start START if used START is the initial date and time see history mode below for details for any extracted log messages e stop STOP ifused STOP is the final data and time for any extracted log messages e limit LIMIT the connection imposes a hard limit on the number of messages that can be extracted with each pull The default is 5000 messages e _ preload PRELOAD this value is used only when pulling messages in live mode If non null then it specifies the number of historical messages to retrieve on the first pull Queries to the log database result in an AttributeTable for each entry This table contains the following At
60. rivate Canvas class is added It simply overrides the paint method and ensures that a circle of the correct size and color is drawn To make it easier for subclasses to draw other shapes than a circle the actual code to draw the circle is separated out and is part of the JesCircle class itself private class Canvas extends JPanel public void paint Graphics g super paint g if getMode drawShape g public void drawShape Graphics g g setColor m color g fillOval 0 0 doGetWidth 3 doGetHeight 3 g setColor new Color 0 0 0 g drawOval 0 0 doGetWidth 3 doGetHeight 3 The JesCircle class has now been created and all that is left to be done is to inform the JES that there is a new widget available Since this is a standard widget it must be added to the standard widget set Using the CSF PropertyTool edit the Property Table csf jes Add the name JesCircle to the list of widgets in the widgets property Then add a new property named JesCircle to describe the new widget The value of this property consists of a short description to display in the JES editor followed by the full class path to the widget s class a default width default height and the widget s category all separated by commas For example Circle atst cs tools jes widgets JesCircle 20 20 Status Details on adding new widgets to a custom widget set are found in Appendix D TN 0089 Rev B Page 40 of 54 Java Engine
61. rst field is used Precision if the attribute is a decimal value this value is the number of decimal places that will be displayed Align The alignment of text within the text update Can be set to Left Right Center Leading and Trailing Colors Color Connection These allow color rules to be set for this update TN 0089 Rev B Page 24 of 54 Java Engineering Screens User Manual 6 3 CONTROL WIDGETS Control widgets allow the control of targets They may also reflect status information from those targets Unlike status widgets however they do not retain direct access through their connection when they are placed into screens that are embedded into other widgets 6 3 1 Attribute Table New An attribute table can be used to get or set values in a Component and behaves similarly to the Configuration JesWidget discussed below Unlike the Configuration Ada widget however arbitrary attributes may be added to J the table using the editing form on the left of the Lie widget 8 o pl Remove Attributes the initial list of attribute names that can be set or fetched by this widget e Connection the target rate and fields with default values see Section 3 1 for a description on _set_ Get how Connection fields with default values are used Fields without default values are ignored e Live edit enable disable live editing 6 3 2 Check Box ll
62. s for archive entries of interest It can be a simple component name or a comma separated list of regular expressions identifying the components of interest For example a target name of atst ics visp atst ics vbi would select entries from VBI and ViSP components only The following meta fields are valid for an archive connection e name ENTRY NAMES this identifies the name s of entries of interest As with the target name ENTRY_NAME may be a simple entry name or a comma separated list of entry names This is a required meta field e start START if used START is the initial date and time see archive mode below for details for any extracted archive entries e stop STOP ifused STOP is the final data and time for any extracted archive entries e limit LIMIT the connection imposes a hard limit on the number of entries that can be extracted with each pull The default 5000 entries may be overridden by setting LIMIT to some other value e _ preload PRELOAD this value is used only when pulling entries in live mode If non null then it specifies the number of historical entries to retrieve on the first pull Queries to the archive result in an AttributeTable for each entry This table contains the following Attributes Any or all of these attribute names may be specified as standard fields for processing e timeStamp the time the entry was recorded into the archive TN 0089 Rev B Page 7 of 54 Java Engineering S
63. s jes JesColor tools jes JesColorList tools jes JesEditWindow tools jes JesRegisterHelper tools jes JesWidget tools jes connect Connection tools jes connect ConnectionCallback modifed by sbw TN 0089 Rev B Page 41 of 54 Java Engineering Screens User Manual gt f or oval to the box The JesWidget that draws a circle colour of the circle is set by a colour rule allowing dynamic changing of the colour lt p gt public class JesCircle extends Use ease public public private private private private A A A A F F HF E i gt Constructor super x Canvas m Connection connect nul Canvas null JesCol JesCol orList sol or m color nul r sets up the drawing canvas and registers it so the JesWidget can be dragged around when in edit mode w h box internalSetup w h public JesCircle int x super x w h internalSetup w h m color m canvas m canvas m canvas m canvas setLayout nul setLocation setSize w 2 private void internalSetup int w new JesColor 0 new Canvas int y attachDrag m_canvas add m_canvas TAttributeTable getValue return getFields TAttributeTabl return new AttributeTable param x x coordinate of the circle in pixels param y y coor
64. st minimal support for operating in the programmed execution mode In the case of JesCircle there is no outgoing control and incoming control simply updates the color of the circle TN 0089 Rev B Page 37 of 54 Java Engineering Screens User Manual Support the programmatic interface public IAttributeTable getValue return getFields public IAttributeTable getFields return new AttributeTable public void setValue IAttributeTable values String target connect getTarget String fieldName connect getFields 0 String val ConnectionCallback getFieldValue target fieldname values if null val setColorField val The doGenerateXML method must be implemented for any JesWidget It is called whenever the user saves the screen and must therefore be used to write out all information that will allow the widget to be reconstructed to the exact same state The JesAttributeTable passed in will already contain the x y width and height as the JesWidget class takes care of this Add to the table extra information and then return it The circle widget adds the connection and the set of color rules public JesAttributeTable doGenerateXML JesAttributeTable att String color JesColorItem toString m_col att insert new Attribute connection connect toString att insert new Attribute color JesColorItem toString m_col return att The initialise meth
65. t This is a special widget and is explained in the next section TN 0089 Rev B Page 14 of 54 Java Engineering Screens User Manual 5 EDITING JES ENGINEERING SCREENS Editing an engineering screen is very simple and fast Figure 9 shows a screen generated for a simulation program This screen was created in a short space of time Putting a screen into edit mode is achieved by right clicking on the background of the screen and selecting edit from the popup menu Figure 10 shows the same screen as in figure 9 but in edit mode e eS DD ETT TCS Control Ra 10 10 10 10 Sidereal Time 17 26 49 Dec 3224 20 55 State aborted Reason exception javalang NullPointerExcepti Track ID track 000000003205 0000000000031 TCS configuration MCS and ECS Control Cover Status FOCS Az Graph atsttcs mode w jatsttcs mode follow j Mount Control Demand Current Position Position Error Velocity Add Azimuth 53 0762 0 0000 0 0000 0 0000 ro Elevation 10 0000 0 0000 0 0000 0 0000 E 7 Coude 62 3400 0 0000 0 0000 0 0000 Clear Apply Enclosure Control Current Position Velocity MCS Control ECS Control SO 0 0008 Bon Elevation 0 0000 0 0000 FOCS Control Charts Figure 9 Example of an engineering screen EA TCs Control Edit TD lid iii MA x CS Control top tcs tcsstate Ra Lop Ucs tcss el fLop tcs tcss
66. t here lt p gt lt p gt Insert into the attribute table all the information required to recreate th xact same state that this circle is currently in This means the following must be added lt ul gt lt li gt nam the name of the class so the manager knows to create a JesCircle lt li gt lt li gt connect the name of the connection lt 1li gt lt li gt colour the set of colour rules for the circle lt li gt lt ul gt param att the JesAttributeTable containing all information E for saving this widget to file A A A a e FF CAC CACA CACA CAC CACA F F AC gt public JesAttributeTable doGenerateXML JesAttributeTable att TN 0089 Rev B Page 43 of 54 Java Engineering Screens User Manual if null connect att insert new Attribute connection connect toString att insert new Attribute color m_col toString return att lt p gt Implements the initialise method in JesWidget This method will get called whenever the circle is loaded from file A JesAttributeTable will be passed in containing all the information required to put this circle into the correct state lt p gt lt p gt The following information is expected to recreate this widget lt ul gt lt li gt connection the name of the connection lt 1li gt lt li gt colo
67. terest It must keep a set of color rules and use the correct color when drawing the circle Any new widget must extend the JesWidget class The constructor must take in order the x y width height and owning JesBox and must call the super constructor The constructor initializes the member variables The Canvas class is a private class that simple extends the JPanel and overrides its paint method The attachDrag method is called and passed the Canvas but it can accept any JComponent This sets up the widget so that when placed in edit mode the user can drag it around the screen Finally the add method is called and again passed the Canvas Constructor sets up the drawing canvas and registers it so the JesWidget can be dragged around when in edit mode param x x coordinate of the circle in pixels param y y coordinate of the circle in pixels param w width of the circle in pixels param h height of the circle in pixels param box the IJesBox that owns this widget A F HF public JesCircle int x int y int w int h IJesBox box super xXx Y w h box m color new JesColor m_canvas new Canvas m_canvas setLayout null m_canvas setLocation l m_canvas setSize w 2 attachDrag m_canvas add m_canvas The doReSize method overrides an empty method in JesWidget and is called whenever the circle is resized It simply resizes the Canvas All widgets must provide at lea
68. the value is greater than the range gt lt the value is in the range or above it the value is in the range is also the value is not in the range the value is in the range or below it lt the value is less than the range matches any value regardless of the range and range can be N1 a single value range accepted TN 0089 Rev B Page 11 of 54 Java Engineering Screens User Manual e N1 N2 a range bounded by N1 N2 i e both N1 and N2 are in the range If both N1 and N2 are integer values then integer comparisons are used Otherwise a double comparison is used If the color rule is not in the above form it is treated as a simple string and string equality is used for comparison 3 9 IMAGE RULES Some widgets support the dynamic selection of an image from a set of images based on the value found in an incoming connection message The image selection rule matching mirrors the matching found in color rule matching described above r Image rule selection unknown P initialized loaded running Add Remove Ok DE Figure 7 Image rule editor showing string rules 3 10 TEXT RULES Some widgets support the dynamic selection of a text message from a set of such messages based on the value found in an incoming connection message The text selection rule matching mirros the matching found in color and image
69. time for this widget to start up particularly if not preload count has been defined 6 2 8 Progress bar r New The progress bar displays values by filling a rectangle vertical or horizontal by the ratio of each value to a minimum and maximum The fill is always along the longer axis of the rectangle e Connection the target rate and field Only the first field is used e Color the color rules to apply to the bar e Min the minimum value expected e Max the maximum value expected e Live edit enable disable live editing TN 0089 Rev B Page 22 of 54 Java Engineering Screens User Manual 6 2 9 Table Display New 5 This widget displays all of a connection s fields of interest on each received message using a JTable Each row of the table is a separate message If live editing is enabled the table display may be adjusted while executing target 0 A target 1 0 49 0 42 0 03 0 21 0 19 0 05 0 29 0 09 e Connection the target rate and fields e MaxRows limit the display e Live Edit enable disable live table edit HL 4 6 2 10 Table 2D Display This widget displays selected fields from its Connection It is particularly well suited to displaying Row MyLabell MyLabel2 field5 ys MME deraut value Lo Ten la fields containing vectors of values Each field s 2 N A 20 Twenty contents are displ
70. tributes Any or all of these attribute names may be specified as standard fields for processing e timeStamp the time the entry was recorded into the archive e source the source component for the entry TN 0089 Rev B Page 8 of 54 Java Engineering Screens User Manual e category the log category for the message e type the log message type e level the debug level if this message is of debug type e message the log message The log connection operates in two fundamental modes e live mode messages are extracted from the log database as they are entered into the archive When pulling from the connection only LIMIT messages inserted since the last pull are processed A grab from the connection fetches the most recently logged message matching the search criteria Omitting the __start meta field forces live mode e history mode messages are extracted from the historical record in the log database The __start meta field must be present and valid to use history mode Messages are extracted from the log database starting with the START date and time If the __stop meta field is present and valid then null is returned for any fetches of messages timestamped after that date and time Each pull grabs up to LIMIT default is 5000 messages A grab fetches the most recently logged message matching the search criteria 3 2 CUSTOM WIDGET SETS The CSF supplied JesManager supports a standard set of widgets that are describe
71. trol connection Attempts to submit empty Configurations are ignored TN 0089 Rev B Page 5 of 54 Java Engineering Screens User Manual e A submit connection this is identical to a control connection with the single exception that push operations do so with a submit command instead of a set command There is no callback associated with this push e A debug connection the target must be the name of any remote object implementing the IRemote interface This connection provides simple access to a remote object s debugging control and monitoring interface This is a specialized connection of limited use Only a few widgets can do anything meaningful with this connection type e A lifecycle connection the target must be the name of a remote object implementing the IComponentAdmin interface i e a Component or Controller This connection provides access to a remote object s lifecycle control and monitoring interface and allows the monitoring of the remote object s health This is a specialized connection of limited use Only a few widgets can do anything meaningful with this connection type e An archive connection for access to the Engineering Archive database including live access to new archived values See below for details e A log connection for read only access to the Log message database including live access to new log messages See below for details e A shell connection for read only access to the output of a shell co
72. tyles and color based on the value of a specified connection field Text rules are used to select the iitialised appropriate message to display e Connection the target update rate and field Only the first field is used e Messages the text rules to apply 6 2 6 Graph Stripchart 40 0 MCS Elevation The graph JesWidget allows plotting over time of up to four data ECS Elevation gt sets Each data set comes from a different connection as the first f i field The graph widget expects each data item to be a double but integer values are automatically converted The length of time J data is remembered can be set as well as the rate of graph update The following attributes apply to the graph widget Time the time in seconds to hold data Rate the update rate of the graph in seconds Max the maximum y value of the graph Min the minimum y value of the graph Descriptions for each line including the connection line color and data label each line may be enabled or disabled not shown e Show Value display the current value from each enabled line in the data label e AutoScale if this is selected then the Max and Min values are meaningless Instead the y axis will change to ensure that all values are always visible on the graph e Live Edit enable disable live editing of graph settings 4 0 TN 0089 Rev B Page 21 of 54 Java Engineering Screens User Manual 6 2 7 Monitor Log Messag
73. ur the set of colour rules for the circle lt li gt lt ul gt lt p gt param att the JesAttributeTable containing all of the information required to put this circle into the same state as when it was saved iat public void initialise JesAttributeTable att m col new JesColorlist m_col fillFromString att getString color String conString att getString connection if null conString connect Connection fromString this conString if null connect connect makeConnection attachCallback Attach a callback to the connection private void attachCallback if null connect final String fieldName connect getFields 0 if null fieldName ConnectionCallback cb new ConnectionCallback connect public void callback String target TAttributeTable value if getMode TN 0089 Rev B Page 44 of 54 Java Engineering Screens User Manual String val getFieldValue target fieldname value if null val setColorField val else Only warn if there s data at all Log warn JesCircle Bad index fieldName y connect pull cb else Log warn No field name given for connection in Log curLoc else Log warn No connection in Log curLoc private void setColorField String val JesColor newCol
74. uses the same syntax as string format specifiers use by the Java method format in the java lang String class The accepted conversion characters are s b h d o x e f g a and A Ifthe format specifier is omitted then s is assumed The A format conversion can be used to convert decimal angles into DMS angle strings For example 2A would convert 350 49 into 350 29 24 00 Finally the field description may optionally be suffixed with a default value assignment that can be used on push and submit operations If a field with a default value does not appear as an attribute name in the table being pushed or submitted then it is added with the default value The form of the default value assignment is v1 v2 where each of the values to the right of the assignment is the default value to use for that element in the resulting Attribute s value array embedded commas should be escaped by a backslash to avoid confusion Some connections specifically the archive and log connections require additional configuration information This information is provided to the connection using special meta fields These meta fields are not the names of Attributes to be transmitted across the connection but are used by the connections to refine the database search criteria In addition the target name has special meaning to these connections 3 1 1 Configuring an Archive Connection The target name for an archive connection identifies the source component or component
75. ve table edit TN 0089 Rev B Page 23 of 54 Java Engineering Screens User Manual 6 2 11 Text Box New A text box receives messages from a connection and appends them to the display area allowing scrolling as needed submitted_00 a a bb e Connection the target rate and field Only the first field is submitted_0 04 used i submitted _005 e Track history enable disable the appending of messages submitted 006 e Update only on change only update the display if the submitted_007 received value differs from the currently displayed value submitted_008 e Live Edit enable disable live editing Clear 6 2 12 Text Update x Text updates are used for listening to connections and displaying relevant information from those connections It is possible to set a connection and field for the widget When a message is containing Aborted that field is received from the connection that field s value will be displayed in the text update JesWidget While in edit mode a text update will display the name of the event it is interested in and when placed into execute mode the text update will display the last value obtained from the most recent post of the event A separate connection can be used to apply color rules to the text that is displayed In the example shown here a matched color rule has changed the color of the displayed text to red New Connection the target rate and field Only the fi
Download Pdf Manuals
Related Search
Related Contents
Manual de Usuario AUNA NET PLC Manuel d`installation et d`entretien Electrodistributeurs Série Microhmmètre manual de instalação e operação garantia Lorex L224V Series User's Manual Manual of Sensorless Brushless Speed Controller RAE Testing Procedures Copyright © All rights reserved.
Failed to retrieve file