Module Rpi.Mbox.Prop

module Prop: sig .. end
Property interface

Convenience interface for the mailbox property interface (channel Tags_ARM_to_VC).

Property values

type 'a t = 
| Unit : unit t
| Bytes : int * (Rpi.Mem.Map.bytes -> 'a0 Rpi.result) -> 'a0 t
| Int32 : int * (Rpi.Mem.Map.int32s -> 'a1 Rpi.result) -> 'a1 t
| Int64 : int * (Rpi.Mem.Map.int64s -> 'a2 Rpi.result) -> 'a2 t
The type for response property values. The expected maximal length of the response and a property parser. The map given to the property parser can be shorter than the specified length.
val unit : unit t
unit is an empty property.
val string : max:int -> string t
string is a string of maximum length max.
val int : int t
int is an integer property (parsed from an int32).
val int32 : int32 t
int32 is an int32 property.
val int64 : int64 t
int64 is an int64 property.
val int_pair : (int * int) t
int is an integer pair property (parsed from two int32s).
val int32_pair : (int32 * int32) t
int32_pair is an int32 pair property.
val int64_pair : (int64 * int64) t
int32_pair is an int64 pair property.


type args = int32 list 
The type for property requests arguments. FIXME this should maybe be generalized but at the moment all published requests arguments are uint32.
type 'a req 
The type for requests of properties of type 'a.
type ereq 
The type for existential requests.
val req : ?args:args ->
int32 -> resp:'a t -> 'a req
req t args resp is a property for tag t with request arguments args (defaults to []) and response property parsed with resp.
val r : 'a req -> ereq
r req is an existential request for r.


type resp 
The type for responses.
val send : ereq list -> resp Rpi.result
send reqs sends the list of requests reqs in the given order.
val find : resp -> 'a req -> 'a option Rpi.result
find resp req finds the property value of req in response resp. None is returned if the property can't be found.