| CMakeLists.txt |
|
2394 |
- |
| configure.cmake |
|
1576 |
- |
| doc |
|
|
- |
| qcanbus.cpp |
!
\class QCanBus
\inmodule QtSerialBus
\since 5.8
\brief The QCanBus class handles registration and creation of bus plugins.
QCanBus loads Qt CAN Bus plugins at runtime. The ownership of serial bus plugins is
transferred to the loader.
|
6623 |
- |
| qcanbus.h |
|
1053 |
- |
| qcanbusdevice.cpp |
!
\class QCanBusDevice
\inmodule QtSerialBus
\since 5.8
\brief The QCanBusDevice class is the interface class for CAN bus.
QCanBusDevice communicates with a CAN plugin providing users with a convenient API.
The CAN plugin must be specified during the object creation.
|
37050 |
- |
| qcanbusdevice.h |
|
5694 |
- |
| qcanbusdevice_p.h |
|
1565 |
- |
| qcanbusdeviceinfo.cpp |
!
\class QCanBusDeviceInfo
\inmodule QtSerialBus
\since 5.9
\brief The QCanBusDeviceInfo provides information about CAN bus interfaces.
Each plugin may support one or more interfaces with different
capabilities. This class provides information about available functions.
|
4230 |
- |
| qcanbusdeviceinfo.h |
|
1499 |
- |
| qcanbusdeviceinfo_p.h |
|
1025 |
- |
| qcanbusfactory.cpp |
!
\class QCanBusFactory
\inmodule QtSerialBus
\since 5.9
\brief The QCanBusFactory class is a factory class used as the
plugin interface for CAN bus plugins.
All plugins must implement the functions provided by this factory class.
|
1295 |
- |
| qcanbusfactory.h |
|
862 |
- |
| qcanbusframe.cpp |
!
\class QCanBusFrame
\inmodule QtSerialBus
\since 5.8
\brief QCanBusFrame is a container class representing a single CAN frame.
\l QCanBusDevice can use QCanBusFrame for read and write operations. It contains the frame
identifier and the data payload. QCanBusFrame contains the timestamp of the moment it was read.
\sa QCanBusFrame::FrameId, QCanBusFrame::TimeStamp, payload()
|
15933 |
- |
| qcanbusframe.h |
|
8227 |
- |
| qcancommondefinitions.cpp |
!
\namespace QtCanBus
\inmodule QtSerialBus
\since 6.5
\brief The QtCanBus namespace provides some commons enums that are used in
the CAN bus handling part of the QtSerialPort module.
|
3761 |
- |
| qcancommondefinitions.h |
|
1444 |
- |
| qcandbcfileparser.cpp |
!
\class QCanDbcFileParser
\inmodule QtSerialBus
\since 6.5
\preliminary
\brief The QCanDbcFileParser class can be used to parse DBC files.
A CAN database or CAN DBC file is an ASCII text file that contains
information on how to decode and interpret raw CAN bus data. Some more
details about the format can be found \l {CSSElectronics DBC Intro}{here}
or \l {OpenVehicles DBC Intro}{here}.
The QCanDbcFileParser class takes the input DBC file, parses it, and
provides a list of \l {QCanMessageDescription}s as an output. These message
descriptions can be forwarded to \l QCanFrameProcessor, and later used
as rules to encode or decode \l {QCanBusFrame}s.
Use one of \l parse() overloads to specify a file or a list of files that
will be processed. Both overloads return \c true if the parsing completes
successfully and \c false otherwise.
Call the \l error() method to get the error which occurred during the
parsing. If the parsing completes successfully, this method will return
\l {QCanDbcFileParser::}{None}. Otherwise, you can use an
\l errorString() method to get the string representation of an error.
During the parsing some non-critical problems may occur as well. Such
problems will be logged, but the parsing process will not be aborted. You
can use the \l warnings() method to get the full list of such problems
after the parsing is completed.
If the parsing completes successfully, call \l messageDescriptions() to get
a list of the message descriptions that were extracted during the last
\l parse() call. Call \l messageValueDescriptions() to get the textual
descriptions of signal raw values, if they are available.
Use the static \l uniqueIdDescription() function to get a
\l QCanUniqueIdDescription for the DBC format.
\code
QCanDbcFileParser fileParser;
const bool result = fileParser.parse(u"path/to/file.dbc"_s);
// Check result, call error() and warnings() if needed
// Prepare a QCanFrameProcessor to decode or encode DBC frames
QCanFrameProcessor frameProcessor;
frameProcessor.setUniqueIdDescription(QCanDbcFileParser::uniqueIdDescription());
frameProcessor.setMessageDescriptions(fileParser.messageDescriptions());
\endcode
\note The parser is stateful, which means that all the results (like
extracted message descriptions, error code, or warnings) are reset once the
next parsing starts.
\section1 Supported Keywords
The current implementation supports only a subset of keywords that you can
find in a DBC file:
\list
\li \c {BO_} - message description.
\li \c {SG_} - signal description.
\li \c {SIG_VALTYPE_} - signal type description.
\li \c {SG_MUL_VAL_} - extended multiplexing description.
\li \c {CM_} - comments (only for message and signal descriptions).
\li \c {VAL_} - textual descriptions for raw signal values.
\endlist
Lines starting from other keywords are simply ignored.
\sa QCanMessageDescription, QCanFrameProcessor
|
43364 |
- |
| qcandbcfileparser.h |
|
1884 |
- |
| qcandbcfileparser_p.h |
|
1958 |
- |
| qcanframeprocessor.cpp |
!
\class QCanFrameProcessor
\inmodule QtSerialBus
\since 6.5
\preliminary
\brief The QCanFrameProcessor class can be used to decode
a \l QCanBusFrame or to convert the input data into a \l QCanBusFrame that
is ready to be sent to the receiver.
The QCanFrameProcessor class operates on the CAN message descriptions
(represented by the \l QCanMessageDescription and \l QCanSignalDescription
classes) and a unique identifier description (represented by
\l QCanUniqueIdDescription). It uses the descriptions to decode the
incoming \l QCanBusFrame or to encode the user-specified data into the
proper payload.
Before doing any decoding or encoding, the QCanFrameProcessor instance
\e must be initialized properly. The following data needs to be provided:
\list
\li A \l {QCanUniqueIdDescription::isValid}{valid} unique identifier
description. Use the \l setUniqueIdDescription() method to provide
a proper description.
\li At least one message description. Use the
\l addMessageDescriptions() or \l setMessageDescriptions() method
to provide message descriptions.
All message descriptions \e must have distinct unique identifiers.
Each message can contain multiple signal descriptions, but signal
names within one message \e must be unique as well.
\endlist
The \l parseFrame() method can be used to process the incoming
\l QCanBusFrame. The method returns a \l {QCanFrameProcessor::}{ParseResult}
structure which contains the \l {QCanFrameProcessor::ParseResult::uniqueId}
{unique identifier} and the \l {QCanFrameProcessor::ParseResult::signalValues}
{signal values} map. The keys of the map are the
\l {QCanSignalDescription::name}{signal names}, and the values of the map
are signal values.
The \l prepareFrame() method can be used to generate a \l QCanBusFrame
object for a specific unique identifier, using the provided signal names
and desired values.
Errors can occur during the encoding or decoding process. In such cases
the \l error() and \l errorString() methods can be used to get the
information about the error.
Some non-critical problems may occur as well. Such problems will be logged,
but the process will not be stopped. After the process is completed, the
\l warnings() method can be used to access the list of all the warnings.
\note The last error and error description, as well as the warnings, are
reset once the decoding or encoding is started.
\sa QCanMessageDescription, QCanSignalDescription
|
48686 |
- |
| qcanframeprocessor.h |
|
2044 |
- |
| qcanframeprocessor_p.h |
|
1780 |
- |
| qcanmessagedescription.cpp |
!
\class QCanMessageDescription
\inmodule QtSerialBus
\since 6.5
\preliminary
\brief The QCanMessageDescription class describes the rules to process a CAN
message and represent it in an application-defined format.
A CAN message is basically a \l QCanBusFrame. The description of a CAN
message includes the following:
\list
\li Message ID.
\li Message name.
\li Message length in bytes.
\li Source of the message (transmitter).
\li Description of signals in the message.
\endlist
The QCanMessageDescription class provides methods to control all those
parameters.
\section1 Message ID
The message ID is a unique identifier, which is used to select the proper
message description when decoding the incoming \l QCanBusFrame or encoding
a \l QCanBusFrame based on the provided data.
See \l QCanUniqueIdDescription documentation for more details on the unique
identifier description.
\section1 Signal Description
The signal description is represented by the \l QCanSignalDescription
class. The QCanMessageDescription class only provides a list of signals that
belong to the message.
\sa QCanSignalDescription, QCanUniqueIdDescription
|
9463 |
- |
| qcanmessagedescription.h |
|
3074 |
- |
| qcanmessagedescription_p.h |
|
1099 |
- |
| qcansignaldescription.cpp |
|
24902 |
- |
| qcansignaldescription.h |
|
5254 |
- |
| qcansignaldescription_p.h |
|
1986 |
- |
| qcanuniqueiddescription.cpp |
!
\class QCanUniqueIdDescription
\inmodule QtSerialBus
\since 6.5
\preliminary
\brief The QCanUniqueIdDescription class describes the rules for accessing
a unique identifier in a \l QCanBusFrame.
A unique identifier is used to distinguish different CAN bus frames and
apply proper \l {QCanMessageDescription}s to encode or decode them.
Different CAN protocols can use different parts of the CAN frame as a unique
identifier (e.g. the DBC protocol uses the whole FrameId as a unique
identifier).
This class contains parameters to specify the unique identifier position
within a CAN frame in a flexible way:
\list
\li The part of the frame which will be used to extract the unique
identifier (FrameId or payload).
\li The start bit of the unique identifier, relative to the selected
part of the frame. The bits are counted starting from the LSB.
\li The number of bits used to represent the unique identifier.
\li The endian used to extract the value.
\endlist
Check the \l {Data Endianness Processing} section of the
\l QCanSignalDescription documentation to see how the start bit value
depends on the data endianness. The approach that is described there is
also used for unique id description.
The actual value of a unique identifier is represented by the
\l QtCanBus::UniqueId type.
\sa QCanMessageDescription
|
5742 |
- |
| qcanuniqueiddescription.h |
|
2185 |
- |
| qcanuniqueiddescription_p.h |
|
1080 |
- |
| qmodbus_symbols_p.h |
|
2115 |
- |
| qmodbusadu_p.h |
!
\internal
\fn quint8 QModbusSerialAdu::calculateLRC(const char *data, qint32 len)
Returns the LRC checksum of the first \a len bytes of \a data. The checksum is independent
of the byte order (endianness).
|
5289 |
- |
| qmodbusclient.cpp |
!
\class QModbusClient
\inmodule QtSerialBus
\since 5.8
\brief The QModbusClient class is the interface to send Modbus requests.
The QModbusClient API is constructed around one QModbusClient object, which holds the common
configuration and settings for the requests it sends. One QModbusClient should be enough for
the whole Qt application.
Once a QModbusClient object has been created, the application can use it to send requests.
The returned object is used to obtain any data returned in response to the corresponding request.
QModbusClient has an asynchronous API. When the finished slot is called, the parameter
it takes is the QModbusReply object containing the PDU as well as meta-data (Addressing, etc.).
Note: QModbusClient queues the requests it receives. The number of requests executed in
parallel is dependent on the protocol. For example, the HTTP protocol on desktop platforms
issues 6 requests in parallel for one host/port combination.
|
20598 |
- |
| qmodbusclient.h |
|
1595 |
- |
| qmodbusclient_p.h |
|
4255 |
- |
| qmodbuscommevent_p.h |
Unused |
2759 |
- |
| qmodbusdataunit.cpp |
!
\class QModbusDataUnit
\inmodule QtSerialBus
\since 5.8
\brief QModbusDataUnit is a container class representing single bit and
\c 16 bit word entries in the Modbus register.
\l QModbusDataUnit can be used for read and write operations. The entries
are addressed via \l startAddress() and the \l valueCount() number of
contiguous entries. \l registerType() determines which register is used for
the operations. Note that some registers are read-only registers.
The actual \l values() are either single bit or \c 16 bit based.
\l QModbusDataUnit::DiscreteInputs and \l QModbusDataUnit::Coils
only accept single bits. Therefore \c 0 is interpreted as \c 0 and anything
else \c 1.
|
5597 |
- |
| qmodbusdataunit.h |
|
2495 |
- |
| qmodbusdevice.cpp |
!
\class QModbusDevice
\inmodule QtSerialBus
\since 5.8
\brief The QModbusDevice class is the base class for Modbus classes, \l QModbusServer
and \l QModbusClient.
|
11698 |
- |
| qmodbusdevice.h |
|
2455 |
- |
| qmodbusdevice_p.h |
!
According to the Modbus specification, in RTU mode message frames
are separated by a silent interval of at least 3.5 character times.
Calculate the timeout if we are less than 19200 baud, use a fixed
timeout for everything equal or greater than 19200 baud.
If the user set the timeout to be longer than the calculated one,
we'll keep the user defined.
|
2693 |
- |
| qmodbusdeviceidentification.cpp |
!
\class QModbusDeviceIdentification
\inmodule QtSerialBus
\since 5.8
\brief The QModbusDeviceIdentification is a container class representing
the physical and functional description of a Modbus server.
The Device Identification interface is modeled as an address space composed
of a set of addressable data elements. The data elements are called objects
and an \l ObjectId identifies them.
|
7814 |
- |
| qmodbusdeviceidentification.h |
Basic mandatory |
3000 |
- |
| qmodbuspdu.cpp |
!
\internal
Returns the minimum data size in bytes for the given \a pdu and the
Modbus PDU \a type. If the PDU's function code is invalid, undefined
or unknown, the return value will be \c {-1}.
|
32249 |
- |
| qmodbuspdu.h |
|
8454 |
- |
| qmodbusreply.cpp |
!
\class QModbusReply
\inmodule QtSerialBus
\since 5.8
\brief The QModbusReply class contains the data for a request sent with
a \l QModbusClient derived class.
|
8084 |
- |
| qmodbusreply.h |
|
1594 |
- |
| qmodbusrtuserialclient.cpp |
!
\class QModbusRtuSerialClient
\inmodule QtSerialBus
\since 6.2
\brief The QModbusRtuSerialClient class represents a Modbus client
that uses a serial bus for its communication with the Modbus server.
Communication via Modbus requires the interaction between a single
Modbus client instance and multiple Modbus servers. This class
provides the client implementation via a serial port.
|
4700 |
- |
| qmodbusrtuserialclient.h |
|
1361 |
- |
| qmodbusrtuserialclient_p.h |
|
12988 |
- |
| qmodbusrtuserialserver.cpp |
!
\class QModbusRtuSerialServer
\inmodule QtSerialBus
\since 6.2
\brief The QModbusRtuSerialServer class represents a Modbus server
that uses a serial port for its communication with the Modbus client.
Communication via Modbus requires the interaction between a single Modbus
client instance and multiple Modbus server. This class provides the Modbus
server implementation via a serial port.
Since multiple Modbus server instances can interact with a Modbus client
at the same time (using a serial bus), servers are identified by their
\l serverAddress().
|
4648 |
- |
| qmodbusrtuserialserver.h |
|
1395 |
- |
| qmodbusrtuserialserver_p.h |
|
16285 |
- |
| qmodbusserver.cpp |
!
\class QModbusServer
\inmodule QtSerialBus
\since 5.8
\brief The QModbusServer class is the interface to receive and process Modbus requests.
Modbus networks can have multiple Modbus servers. Modbus Servers are read/written by a
Modbus client represented by \l QModbusClient. QModbusServer communicates with a Modbus
backend, providing users with a convenient API.
|
51489 |
- |
| qmodbusserver.h |
|
2127 |
- |
| qmodbusserver_p.h |
|
3808 |
- |
| qmodbustcpclient.cpp |
!
\class QModbusTcpClient
\inmodule QtSerialBus
\since 5.8
\brief The QModbusTcpClient class is the interface class for Modbus TCP client device.
QModbusTcpClient communicates with the Modbus backend providing users with a convenient API.
|
2060 |
- |
| qmodbustcpclient.h |
|
747 |
- |
| qmodbustcpclient_p.h |
error |
10171 |
- |
| qmodbustcpserver.cpp |
!
\class QModbusTcpServer
\inmodule QtSerialBus
\since 5.8
\brief The QModbusTcpServer class represents a Modbus server that uses a
TCP server for its communication with the Modbus client.
Communication via Modbus requires the interaction between a single Modbus
client instance and single Modbus server. This class provides the Modbus
server implementation via a TCP server.
Modbus TCP networks can have multiple servers. Servers are read/written by
a client device represented by \l QModbusTcpClient.
|
6125 |
- |
| qmodbustcpserver.h |
|
1203 |
- |
| qmodbustcpserver_p.h |
This function is a workaround since 2nd level lambda below cannot
call protected QModbusTcpServer::processRequest(..) function on VS2013.
|
8458 |
- |
| qt_cmdline.cmake |
|
0 |
- |
| qtserialbusglobal.h |
|
397 |
- |