Introduction

Welcome to the Operations Training Tutorial, Module 1. In this training module, we will introduce you to the concept of requestors and providers using a simple Time-based Alarm application (alarm clock). You will learn how to create a requestor and a provider (representing the alarm clock). You will also learn how the requestor can use get, set, and invoke operations to interact with the provider.

"Help" files are included with these tutorials. Click on the Help icon (the question mark in a circle) located in the upper-right corner of each section. API documentation (Javadocs) is also accessible within the code portion of this training.

If you have not reviewed the DOF Object Model documentation, please do so now! This training relies on that information so you can make the most of DOF Technology.

For more information, see the DOF Operations Programmer's Guide at https://opendof.org/downloads/dof-operations-programmers-guide-java/ for the Java version and https://opendof.org/downloads/dof-operations-programmers-guide-c/ for C.

Purpose

The purpose of this training is to help system developers understand how requestors and providers work. This includes the following concepts:

Prerequisites

To get the most out of this training, you should be familiar with the DOF Object Model. See https://opendof.org/support/# for more information.

Note: DOF is an object-oriented technology that is modeled on Java language conventions. Therefore, a basic understanding of Java will help you with this training.

Time-Based Alarm

The Time-based Alarm application used in this training was created with the following assumptions:

Time-Based Alarm Interface Items

The Time-based Alarm Interface defines the following items of functionality:

  1. AlarmActive. This is a writable property that stores a boolean value for whether the alarm is set or not. Providers must store the boolean value. Providers must enable requestors to get or subscribe to the value. They must also enable requestors to set the value. A true value means the alarm is on.
  2. AlarmTimeValue. This is a read-only property that stores a date-time value. Providers must store the value and enable requestors to get the value and perform a subscribe operation. Providers do not need to implement set operations for this value since the property is read-only.
  3. SetNewTime. This method allows requestors to set the alarm time. Requestors do this by sending a new alarm time as an input to the method. Providers must change the AlarmTimeValue to the input value in response to this method. In addition, the method must return the boolean for the active value.
  4. AlarmTriggered. Providers must program their applications to trigger this event when the current system time is equal to the AlarmTimeValue and the AlarmActive property is set to true. Providers must also enable requestors to register to the event. (The event has no outputs.)
  5. BadTimeValue. Providers must program their applications to throw this exception when a requestor attempts to set an invalid time value in the SetNewTime method.

Interface Item Identifiers

Every item in an interface is assigned an identifier. These item identifiers must be unique within an interface and may be as large as 216-1; however, because most interfaces have only a few items, item identifiers will typically be small.