public ApolloResult SetRouteInfo(ApolloRouteInfoBase routeInfo) { if (routeInfo == null) { return(ApolloResult.InvalidArgument); } byte[] array; routeInfo.Encode(out array); if (array == null) { ADebug.LogError("WriteData Encode error!"); return(ApolloResult.InnerError); } return(ApolloConnector.apollo_connector_setRouteInfo(base.ObjectId, array, array.Length)); }
public ApolloResult SetRouteInfo(ApolloRouteInfoBase routeInfo) { byte[] buffer; if (routeInfo == null) { return(ApolloResult.InvalidArgument); } routeInfo.Encode(out buffer); if (buffer == null) { ADebug.LogError("WriteData Encode error!"); return(ApolloResult.InnerError); } return(apollo_connector_setRouteInfo(base.ObjectId, buffer, buffer.Length)); }
public ApolloResult WriteData(byte[] data, int len, ApolloRouteInfoBase routeInfo, bool allowLost = false) { if (routeInfo == null) { return(ApolloResult.InvalidArgument); } if (!this.Connected) { return(ApolloResult.NoConnection); } if (len == -1) { len = data.Length; } byte[] array; routeInfo.Encode(out array); if (array == null) { ADebug.LogError("WriteData Encode error!"); return(ApolloResult.InnerError); } return(ApolloConnector.apollo_connector_writeData_with_route_info(base.ObjectId, data, len, array, array.Length, allowLost)); }