summaryrefslogtreecommitdiffstats
path: root/meta-agl-profile-core/recipes-apis/agl-service-identity-agent
diff options
context:
space:
mode:
authorRonan Le Martret <ronan.lemartret@iot.bzh>2018-05-18 14:53:30 +0200
committerStéphane Desneux <stephane.desneux@iot.bzh>2018-06-11 16:17:41 +0000
commit822d58667ad22a755fcd0e68192505075f07f8a9 (patch)
tree4066ba8d0920c53e5bba2b69c6707e4da45d59b7 /meta-agl-profile-core/recipes-apis/agl-service-identity-agent
parent9509ef8e57221bc3b72d2fcf7132771b3508bb65 (diff)
[RCARGEN3] Update Renesas Rcar Gen3 BSP to 3.7
Tested with agl-demo-platform image on: * M3+KF * H3+KF Test results: | Component | Status | |---------------------------------------------------------|------------| | Wifi (U52) | ok | | BT HCI (U52) | ok | | BT Audio(U52) | not tested | | USB2.0(host)(CN13) | not tested | | USB2.0(func)(CN13) | not tested | | USB2.0(on-the-go)(CN13) | not tested | | USB3.0(CN2) | fail | | Multichan Audio(SSI3,4) hphone(CN 32,33) lineout(CN12) | not tested | | CSI : Expansion Board (CN10) | not tested | | CSI : Expansion Board (CN11) | not tested | | CSI : Raspberry Pi camera(CN48) | not tested | | Video Input CMOS camera(CN29) | not tested | | HDMI out(CN49) | ok | | LVDS out(CN7) | not tested | | Radio (CN42, 43) | ok | | Gyro, Accel | ok | | GPS (CN16) | ok | | Serial (CN4) | not tested | | CAN(CN17, 18) | ok | | SD (CN47) | fail | | Mini PCIe(CN15) | not tested | | M.2 key M (CN5) | not tested | | MOST (CN22) | not tested | Change-Id: I0779cd6440bf1e8fc958f127aee3c3979da603bb Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
Diffstat (limited to 'meta-agl-profile-core/recipes-apis/agl-service-identity-agent')
0 files changed, 0 insertions, 0 deletions
r { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/*
 * Copyright (C) 2015, 2016 "IoT.bzh"
 * Author "Romain Forlot" <romain.forlot@iot.bzh>
 *
 * 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.
 */

#include "signals.hpp"

namespace utils
{
	signals_manager_t::signals_manager_t()
	{}

	/// @brief Return singleton instance of configuration object.
	signals_manager_t& signals_manager_t::instance()
	{
		static signals_manager_t sm;
		return sm;
	}

	/// @brief Return Subscribed signals map mutex.
	std::mutex& signals_manager_t::get_subscribed_signals_mutex()
	{
		return subscribed_signals_mutex_;
	}

	///
	/// @brief return the subscribed_signals map.
	/// 
	/// @return Map of subscribed signals.
	std::map<int, std::shared_ptr<low_can_subscription_t> >& signals_manager_t::get_subscribed_signals()
	{
		return subscribed_signals_;
	}

	///
	/// @fn std::vector<std::string> find_signals(const openxc_DynamicField &key)
	/// @brief return signals name found searching through CAN_signals and OBD2 pid
	///
	/// @param[in] key : can contain numeric or string value in order to search against 
	///   can signals or obd2 signals name.
	///
	/// @return Vector of signals name found. 
	///
	struct signals_found signals_manager_t::find_signals(const openxc_DynamicField &key)
	{
		struct signals_found sf;

		switch(key.type)
		{
			case openxc_DynamicField_Type::openxc_DynamicField_Type_STRING:
					lookup_signals_by_name(key.string_value, application_t::instance().get_all_can_signals(), sf.can_signals);
					lookup_signals_by_name(key.string_value, application_t::instance().get_diagnostic_messages(), sf.diagnostic_messages);
				break;
			case openxc_DynamicField_Type::openxc_DynamicField_Type_NUM:
					lookup_signals_by_id(key.numeric_value, application_t::instance().get_all_can_signals(), sf.can_signals);
					lookup_signals_by_id(key.numeric_value, application_t::instance().get_diagnostic_messages(), sf.diagnostic_messages);
				break;
			default:
				AFB_ERROR("wrong openxc_DynamicField specified. Use openxc_DynamicField_Type_NUM or openxc_DynamicField_Type_STRING type only.");
				break;
		}
		AFB_DEBUG("Found %d signal(s)", (int)(sf.can_signals.size() + sf.diagnostic_messages.size()));
		return sf;
	}
}