Format an Alarm List for a Specific Screen Resolution
- Last UpdatedJul 13, 2023
- 2 minute read
You can customize the format used for an alarms list that is displayed on a Situational Awareness alarms page. This allows you to present the list in a way that will suit a particular screen resolution. For example, you can make the columns wider to suit a page that will display on a UHD 4K monitor.
To customize an alarms list for a specific screen resolution:
-
Use the [Format]FormatName parameter to define the alarms list format you want to use for a particular screen resolution.
The following three examples show the default format used for each of the generic alarm pages included in the Situational Awareness Starter Project. You can use one of these as the basis for a new format that is defined to suit a specific screen resolution.
-
[Format]Alarm = the alarm list format for the generic alarm page.
[Format]Alarm = {PriorityAndState,25}{OnDate,80}{OnTime,90}{Name,250}{State,40}{Cluster,70}{Equipment,220}{Item,160}{UserName,100}{Comment,250}{Category,60}
-
[Format]Summary = the alarm list format for the generic alarm summary page.
[Format]Summary = {PriorityAndState,25}{Name,250}{SumState,40}{OnDate,80}{OnTime,90}{OffDate,80}{OffTime,90}{DeltaTime,90}{Cluster,70}{Equipment,150}{Item,100}{Comment,250}{Category,60}
-
[Format]SOE = the alarm list format for the generic sequence of events page.
[Format]SOE = {PriorityAndState,25}{Date,80}{Time,90}{Message,250}{Name,250}{State,40}{Cluster,70}{Equipment,150}{Item,100}{UserName,100}{UserLocation,100}{Category,60}
For example, you could create [Format]SOE_UHD4K for a sequence of events page that will display on a 4K monitor. Use the width attribute in each field to specify how wide each column will be (in pixels). For example:
[Format]SOE_UHD4K = {PriorityAndState,50}{Date,160}{Time,180}{Message,500}{Name,500}{State,80}{Cluster,140}{Equipment,300}{Item,200}{UserName,200}{UserLocation,200}{Category,120}
-
-
In Graphics Builder, open the alarm page you want to apply the new format to and display the Page Properties.
-
Go to the Event tab, and select the On page entry event.
By default, Situational Awareness alarm pages will have the following Cicode function configured as the On page event command.
AlarmPage_Init(AlarmPage_GetDefaultParameters("<res>"), "<res>", <type>)
Where:
-
<res> = the resolution suffix (for example, HD1080, UHD4K)
-
<type> = the display type (for example, 0 = active alarms, 3 = shelved alarms, 15 =SOE).
-
-
Add the alarm format name defined in step 1 as the fourth argument to the function.
For example, if you configured the format "SOE_UHD4K", the expression should be as follows:
AlarmPage_Init(AlarmPage_GetDefaultParameters("UHD4K"), "UHD4K", 15, "SOE_UHD4K")
-
Save your changes, and compile and run the project.
The columns displayed on the alarm page will now be based on the format you have specified.
See also
Configure a Project that Supports Multiple Screen Resolutions