22
33import 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+ */
3135public 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