Skip to content

Commit 96826cf

Browse files
committed
Java docs for v1_6 models, done is parts.
1 parent 1372fda commit 96826cf

File tree

2 files changed

+58
-2
lines changed

2 files changed

+58
-2
lines changed

ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/ChangeAvailabilityConfirmation.java

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package eu.chargetime.ocpp.model;
22

3-
/**
3+
/*
44
ChargeTime.eu - Java-OCA-OCPP
55
Copyright (C) 2015-2016 Thomas Volden <[email protected]>
66
@@ -26,24 +26,48 @@ of this software and associated documentation files (the "Software"), to deal
2626
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2727
SOFTWARE.
2828
*/
29+
30+
/**
31+
* return by Charge Point to Central System.
32+
*/
2933
public class ChangeAvailabilityConfirmation implements Confirmation {
3034

3135
private AvailabilityStatus status;
3236

37+
/**
38+
* This indicates whether the Charge Point is able to perform the availability change.
39+
*
40+
* @return String, the {@link AvailabilityStatus} of the connector
41+
*/
3342
public String getStatus() {
3443
return status.toString();
3544
}
3645

46+
/**
47+
* This indicates whether the Charge Point is able to perform the availability change.
48+
*
49+
* @return The {@link AvailabilityStatus} of the connector.
50+
*/
3751
public AvailabilityStatus objStatus() {
3852
return status;
3953
}
4054

55+
/**
56+
* Required. This indicates whether the Charge Point is able to perform the availability change.
57+
*
58+
* @param status the {@link AvailabilityStatus} of connector.
59+
*/
4160
public void setStatus(AvailabilityStatus status) {
4261
this.status = status;
4362
}
4463

4564
public ChangeAvailabilityConfirmation() { }
4665

66+
/**
67+
* Handle required fields.
68+
*
69+
* @param status the {@link AvailabilityStatus}, see {@link #setStatus(AvailabilityStatus)}
70+
*/
4771
public ChangeAvailabilityConfirmation(AvailabilityStatus status) {
4872
this.status = status;
4973
}

ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/ChangeAvailabilityRequest.java

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import eu.chargetime.ocpp.PropertyConstraintException;
44

5-
/**
5+
/*
66
ChargeTime.eu - Java-OCA-OCPP
77
Copyright (C) 2015-2016 Thomas Volden <[email protected]>
88
@@ -28,30 +28,62 @@ of this software and associated documentation files (the "Software"), to deal
2828
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2929
SOFTWARE.
3030
*/
31+
32+
/**
33+
* Sent by the Central System to the Charge Point.
34+
*/
3135
public class ChangeAvailabilityRequest implements Request
3236
{
3337
private int connectorId = -1;
3438
private AvailabilityType type;
3539

40+
/**
41+
* The id of the connector for which availability needs to change.
42+
* Id '0' (zero) is used if the availability of the Charge Point and all its connectors needs to change.
43+
*
44+
* @return identification of the connector. 0 = all.
45+
*/
3646
public int getConnectorId() {
3747
return connectorId;
3848
}
3949

50+
/**
51+
* Required. The id of the connector for which availability needs to change.
52+
* Id '0' (zero) is used if the availability of the Charge Point and all its connectors needs to change.
53+
*
54+
* @param connectorId integer, must be a positive number.
55+
* @throws PropertyConstraintException Value was a negative number.
56+
*/
4057
public void setConnectorId(int connectorId) throws PropertyConstraintException {
4158
if (connectorId < 0)
4259
throw new PropertyConstraintException("connectorId", connectorId, "Must be >= 0");
4360

4461
this.connectorId = connectorId;
4562
}
4663

64+
/**
65+
* This contains the type of availability change that the Charge Point should perform.
66+
*
67+
* @return Stirng version of {@link AvailabilityType}.
68+
*/
4769
public String getType() {
4870
return type.toString();
4971
}
5072

73+
/**
74+
* This contains the type of availability change that the Charge Point should perform.
75+
*
76+
* @return {@link AvailabilityType} of the connector.
77+
*/
5178
public AvailabilityType objType() {
5279
return type;
5380
}
5481

82+
/**
83+
* Required. This contains the type of availability change that the Charge Point should perform.
84+
*
85+
* @param type {@link AvailabilityType} of the connector
86+
*/
5587
public void setType(AvailabilityType type) {
5688
this.type = type;
5789
}

0 commit comments

Comments
 (0)