singrdk/base/Contracts/Io.Contracts/VolumeManagerContract.sg

48 lines
1.4 KiB
Plaintext

// ----------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ----------------------------------------------------------------------------
using Microsoft.Singularity.Directory;
using Microsoft.Singularity.Channels;
namespace Microsoft.Singularity.Io
{
public contract VolumeManagerContract: ServiceContract
{
in message RegisterDisk(char[]! in ExHeap name);
out message AckRegisterDisk();
out message NakRegisterDisk();
in message DeregisterDisk(char[]! in ExHeap name);
out message AckDeregisterDisk();
out message NakDeregisterDisk();
out message Connect(DiskDeviceContract.Exp:Start! exp, byte systemId, ulong startSector, ulong sectorCount);
in message AckConnect();
in message NakConnect(DiskDeviceContract.Exp:Start exp);
out message Success();
override state Start: one {
Success! -> Ready;
}
state Ready: one
{
RegisterDisk? -> RegisterAck;
}
state RegisterAck: one
{
AckRegisterDisk! -> Accept;
NakRegisterDisk! ;
}
state Accept: one
{
Connect! -> ( AckConnect? or NakConnect?) -> Accept;
}
}
}