Documentation for resource/Resource.kt

interface Resource

A resource is an abstract representation of a platform.

Each resource provides a unique identification, a list of capabilities, and information about the status of the resource.

since

1.0.0

author

IFS Institute for Software

val status : Status

The status of the resource

Since

1.0.0

val id : String

The unique identification of a resource

Since

1.0.0

val platformDriver : String

The driver id of a resource

Since

1.0.0

val payloadDrivers : List<String>

The id of the payload driver if any

Since

1.0.0

val capabilities : List<Capability<*>>

The list of capabilities of this resource

Since

1.0.0

val isAvailable : Boolean

Check if this resource is available

Since

1.0.0

var plaform : Platform

The platform of this resource

Since

1.0.0

fun has(capability: Capability<*>) : Boolean

Check if the resource has the given capability

Parameters
  • capability – The desired capability

Returns

true iff. the resource has the desired capability, false otherwise

Since

1.0.0

fun markAs(status: Status)

Change the status of the resource to the given status

enum class Status

A [resource][Resource] can be in one of several states, allowing for further filtering

Since

1.0.0

  • UNAVAILABLE

  • AVAILABLE

  • ACQUIRED

  • BUSY

  • FAILED