io.motown.ocpp.websocketjson.wamp.WampMessage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ocpp-websocket-json Show documentation
Show all versions of ocpp-websocket-json Show documentation
Open Charge Point Protocol (OCPP). Provides a JSON web socket endpoint based on OCPP 1.5.
The newest version!
/**
* Copyright (C) 2013 Motown.IO ([email protected])
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.motown.ocpp.websocketjson.wamp;
import com.google.gson.Gson;
import io.motown.ocpp.websocketjson.schema.MessageProcUri;
import java.util.LinkedList;
import java.util.List;
import java.util.Objects;
public class WampMessage {
public static final int CALL = 2;
public static final int CALL_RESULT = 3;
public static final int CALL_ERROR = 4;
private int messageType;
private String callId;
private MessageProcUri procUri;
private Object payload;
private String errorCode;
private String errorDescription;
private String errorDetails;
private static final int CALL_PROC_URI_INDEX = 2;
private static final int CALL_PAYLOAD_INDEX = 3;
private static final int CALL_RESULT_PAYLOAD_INDEX = 2;
private static final int CALL_ERROR_ERROR_CODE_INDEX = 2;
private static final int CALL_ERROR_ERROR_DESCRIPTION_INDEX = 3;
private static final int CALL_ERROR_ERROR_DETAILS_INDEX = 4;
private static final String UNKNOWN_MESSAGE_TYPE_MESSAGE = "Unknown message type: %s";
public WampMessage(List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy