use of com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.command.EzspAddEndpointRequest in project com.zsmartsystems.zigbee by zsmartsystems.
the class EmberNcp method addEndpoint.
/**
* Configures endpoint information on the NCP. The NCP does not remember these settings after a reset. Endpoints can
* be added by the Host after the NCP has reset. Once the status of the stack changes to EMBER_NETWORK_UP, endpoints
* can no longer be added and this command will respond with EZSP_ERROR_INVALID_CALL.
*
* @param endpointId the endpoint number to add
* @param deviceId the device id for the endpoint
* @param profileId the profile id
* @param inputClusters an array of input clusters supported by the endpoint
* @param outputClusters an array of output clusters supported by the endpoint
* @return the {@link EzspStatus} of the response
*/
public EzspStatus addEndpoint(int endpointId, int deviceId, int profileId, int[] inputClusters, int[] outputClusters) {
EzspAddEndpointRequest request = new EzspAddEndpointRequest();
request.setEndpoint(endpointId);
request.setDeviceId(deviceId);
request.setProfileId(profileId);
request.setInputClusterList(new int[] { 0 });
request.setOutputClusterList(new int[] { 0 });
EzspTransaction transaction = ashHandler.sendEzspTransaction(new EzspSingleResponseTransaction(request, EzspAddEndpointResponse.class));
EzspAddEndpointResponse response = (EzspAddEndpointResponse) transaction.getResponse();
logger.debug(response.toString());
lastStatus = null;
return response.getStatus();
}
Aggregations