summaryrefslogtreecommitdiffstats
path: root/templates/feature/agl-all-features
AgeCommit message (Collapse)AuthorFilesLines
2019-07-24add markdown documentation for all machines and featuresStéphane Desneux1-0/+16
THIS IS STILL WIP - not all features/machines are described Bug-AGL: SPEC-1902 Change-Id: I9bd5a3f57946199e1da90cfbed020742710218a1 Signed-off-by: Stéphane Desneux <stephane.desneux@iot.bzh>
2018-03-06Remove sota and sdl from default feature listJan-Simon Möller1-1/+1
sota and sdl need some more fixes for rocko. Remove them from the default feature list. Change-Id: Ia1d98d0f288e683a9c570659805fb613fe09684c Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
2017-08-21meta-agl: Init SDL featurePhong Tran1-1/+1
Add new meta layer meta-agl-sdl for SmartDeviceLink feature. Tested build ok with: source meta-agl/scripts/aglsetup.sh -m raspberrypi3 agl-demo agl-netboot agl-appfw-smack agl-sdl The SmartDeviceLink packages are selected by "agl-sdl" in DISTRO_FEATURES. Bug-AGL: SPEC-805 Change-Id: I416d8418c0ef4fe4de5e5ce084e7b9075e64f85f Signed-off-by: Phong Tran <tranmanphong@gmail.com> Reviewed-on: https://gerrit.automotivelinux.org/gerrit/10625 Reviewed-by: Jeremiah Foster <jeremiah.foster@pelagicore.com> Tested-by: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org> ci-image-build: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org> Reviewed-by: Martin Kelly <mkelly@xevo.com> Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
2017-01-18Revert "Remove agl-sota from ci builds until fixed for morty"Jan-Simon Moeller1-1/+1
This reverts commit 580518e556f73649fb516a350f0906bafb51e6d1. Change-Id: I1514b0619cb85eea5cb101dfe229ab454238cfb5 Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
2017-01-11Remove agl-sota from ci builds until fixed for mortyJan-Simon Möller1-1/+1
Change-Id: I041d13aa77802708beeea92bd25df59a1c56cc4a Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
2016-11-08allow dependency between agl featureRonan2-1/+1
* you can add included.inc file for each feature * if features is include into an other feature, they are print during the --help command #source meta-agl/scripts/aglsetup.sh -h ... Available features: [meta-agl] agl-all-features :( agl-demo agl-appfw-smack agl-devel agl-netboot agl-sota ) agl-archiver agl-devel agl-isafw agl-netboot [meta-agl-devel] agl-renesas-kernel [meta-agl-extra] agl-appfw-smack agl-demo :( agl-appfw-smack agl-devel) Change-Id: I4a72abd48f70a9262203acba84fac24d9dd4dce0 Signed-off-by: Ronan <ronan.lemartret@iot.bzh>
2016-10-19Add shortcut to enable all featuresJan-Simon Möller1-0/+1
This change introduces an agl-all-features flag. It is basically a feature that will enable a list of 'known-good' features from an included file. It is meant to serve two purposes: - simplify automation scripts - ease-of-use for users building the whole set of features Change-Id: Ia962d6ec8a6c6345fb27e303cabbf805e729a8ca Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
r: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { 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 <map>

#include "diagnostic-message.hpp"

#include "../binding/configuration.hpp"
#include "../utils/signals.hpp"

const char *UNIT_NAMES[10] = {
	"POURCENT",
	"DEGREES_CELSIUS",
	"KPA",
	"RPM",
	"GRAMS_SEC",
	"SECONDS",
	"KM",
	"KM_H",
	"PA",
	"NM"
};

diagnostic_message_t::diagnostic_message_t(uint8_t pid, const std::string generic_name, const int min,
	const int max, enum UNIT unit, float frequency,	DiagnosticResponseDecoder decoder,
	DiagnosticResponseCallback callback, bool supported)
	: pid_{pid}, generic_name_{generic_name}, min_{min}, max_{max}, unit_{unit},
	frequency_{frequency}, decoder_{decoder}, callback_{callback}, supported_{supported}
{}

uint32_t diagnostic_message_t::get_pid()
{
	return (uint32_t)pid_;
}

const std::string& diagnostic_message_t::get_generic_name() const
{
	return generic_name_;
}

const std::string diagnostic_message_t::get_name() const
{
	return active_diagnostic_request_t::get_prefix() + "." + generic_name_;
}

float diagnostic_message_t::get_frequency() const
{
	return frequency_;
}

DiagnosticResponseDecoder diagnostic_message_t::get_decoder() const
{
	return decoder_;
}
DiagnosticResponseCallback diagnostic_message_t::get_callback() const
{
	return callback_;
}

bool diagnostic_message_t::get_supported() const
{
	return supported_;
}

void diagnostic_message_t::set_supported(bool value)
{
	supported_ = value;
}

///
/// @brief Build a DiagnosticRequest struct to be passed
///  to diagnostic manager instance.
///
const DiagnosticRequest diagnostic_message_t::build_diagnostic_request()
{
	return {/*arbitration_id: */OBD2_FUNCTIONAL_BROADCAST_ID,
			/*mode: */0x1,
			/*has_pid: */true,
			/*pid: */pid_,
			/*pid_length: */0,
			/*payload[]: */{0},
			/*payload_length: */0,
			/*no_frame_padding: */false,
			/*DiagnosticRequestType: */DiagnosticRequestType::DIAGNOSTIC_REQUEST_TYPE_PID };
}

///
/// @brief Check if a request is an OBD-II PID request.
///
/// @return true if the request is a mode 1 request and it has a 1 byte PID.
///
bool diagnostic_message_t::is_obd2_request(const DiagnosticRequest* request)
{
	return request->mode == 0x1 && request->has_pid && request->pid < 0xff;
}