Skip to content

Commit

Permalink
Added support for power management.
Browse files Browse the repository at this point in the history
  • Loading branch information
chiaming2000 committed Sep 23, 2016
1 parent 774bd9f commit e9fec76
Showing 1 changed file with 35 additions and 2 deletions.
37 changes: 35 additions & 2 deletions kinetic.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ option java_outer_classname = "Kinetic";
// the protocol version number by building this message
// and then reading the value.
message Local {
optional string protocolVersion = 1 [default = "3.0.7"];
optional string protocolVersion = 1 [default = "3.1.0"];
}

// THe message is an authorization and command bytes.
Expand Down Expand Up @@ -186,10 +186,17 @@ message Command {

// Perform Pin-based operations
optional PinOperation pinOp = 8;

// batch operation
// This is included in the END_BATCH and END_BATCH_RESPONSE.
optional Batch batch = 9;

// power management
optional PowerManagement power = 10;
}

message PowerManagement {
optional PowerLevel level = 1;
}

// This is included in the END_BATCH and END_BATCH_RESPONSE.
Expand Down Expand Up @@ -290,6 +297,14 @@ message Command {
// and delete. This error is put against the offending command and "
// the rest of the commands and the END_BATCH return NOT_ATTEMPTED."
INVALID_BATCH = 21;

// the status is returned to caller if commands are received when
// device is in hibernate state
HIBERNATE = 22;

// the status is returned to caller if commands are received when
// device is shutting down.
SHUTDOWN = 23;
}

}
Expand Down Expand Up @@ -521,6 +536,11 @@ message Command {
optional int32 port = 10;
optional int32 tlsPort = 11;

// The unsolicited message at the beginning of a connection will return
// the drive status. The only two possible values are OPERATIONAL
// or HIBERNATE.
optional PowerLevel currentPowerLevel = 18;

// 18, 19 are reserved.
message Interface {
optional string name = 1;
Expand Down Expand Up @@ -619,6 +639,7 @@ message Command {
P2POP = 5; // can do a peer to peer operation
GETLOG = 7; // can get log
SECURITY = 8; // can set up the security roles of the device
POWER_MANAGEMENT = 9; // can setup power management
}

// The maxPriority is checked against the header priority and range
Expand Down Expand Up @@ -742,6 +763,18 @@ message Command {
END_BATCH_RESPONSE = 43;
ABORT_BATCH = 46;
ABORT_BATCH_RESPONSE = 45;

// power management
SET_POWER_LEVEL = 48;
SET_POWER_LEVEL_RESPONSE = 47;
}

enum PowerLevel {
INVALID_LEVEL = -1;
OPERATIONAL = 1; // Fully operational mode, default mode for the drive
HIBERNATE = 2; // All operations will be rejected
SHUTDOWN = 3;
FAIL = 4;
}

}

0 comments on commit e9fec76

Please sign in to comment.