RSDStep
public protocol RSDStep
RSDStep
is the base protocol for the steps that can compose a task for presentation using a
controller appropriate to the device and application. Each RSDStep
object represents one logical
piece of data entry, information, or activity in a larger task.
Implementations included in this SDK include:
RSDGenericStep
is used byRSDFactory
to create a step that does not include a recognized subtype.RSDSectionStep
is used to define a logical subgroup of steps.RSDUIStep
is used to define a display step.RSDTaskInfoStep
is used to combine tasks into a single flow. For example, if the researcher wishes to ask for survey responses before an activity.
A step can be a question, an active test, or a simple instruction. An RSDStep
subclass is usually
paired with an RSDStepController
that controls the actions of the step.
-
A short string that uniquely identifies the step within the task. The identifier is reproduced in the results of a step history.
In some cases, it can be useful to link the step identifier to a unique identifier in a database; in other cases, it can make sense to make the identifier human readable.
Declaration
Swift
var identifier: String { get }
-
The type of the step. This is used to decode the step using a
RSDFactory
. It can also be used to customize the UI.Declaration
Swift
var stepType: RSDStepType { get }
-
Instantiate a step result that is appropriate for this step.
Declaration
Swift
func instantiateStepResult() -> RSDResult
Return Value
A result for this step.
-
Validate the step to check for any configuration that should throw an error.
Throws
An error if validation fails.Declaration
Swift
func validate() throws