+#endif
+
+
+/**
+ * @brief Allows to open socket isotp and send can messsage
+ *
+ * @param subscription The subscription
+ * @param message The can message to send
+ * @param bus_name The bus name where to send message
+ * @return int 0 if ok else -1
+ */
+int low_can_subscription_t::isotp_send(low_can_subscription_t &subscription, message_t *message, const std::string& bus_name)
+{
+ //struct bcm_msg bcm_msg = subscription.make_bcm_head(TX_SEND, cfd.can_id);
+ //subscription.add_one_bcm_frame(cfd, bcm_msg);
+
+ if(subscription.open_socket(subscription, bus_name, ISOTP_PROTOCOL|ISOTP_SEND) < 0)
+ return -1;
+
+ can_message_t *cm = static_cast<can_message_t*>(message);
+ if(subscription.socket_->write_message(*cm) < 0)
+ {
+ AFB_ERROR("Error write iso tp message");
+ return -1;
+ }
+
+ return 0;
+}