上传文件至 'WeighUI/lib'

Signed-off-by: 邵朱铭 <shaozm@auseft.com>
main
邵朱铭 3 days ago
parent 19130e5668
commit 75925e8f30

@ -0,0 +1,351 @@
// 称重系统 IDL 定义文件
// 用于 DDS 数据分发服务
module WeighingSystem {
// ============================================
// Topic: onScaleInfoUpdate
// 称重设备信息更新主题
// ============================================
struct ScaleInfo {
boolean HasVehicle; // 有车 0:无车 1:有车
boolean WeightOK; // 重量稳定信号 0: 不稳定 1:稳定
boolean State; // 设备状态 0:异常仪表 1正常接收仪表
float Value; // 实时重量
float StableValue; // 稳定重量
};
// ============================================
// Topic: onScaleCommandUpdate
// 称重设备命令更新主题
// ============================================
struct ScaleCommand {
boolean Enable; // 是否启用 启动参数
long ResetZero; // 仪表重置0 脉冲信号 1:清零 自动变0
};
// ============================================
// Topic: onWeightInfoOKUpdate
// 称重业务成功信息更新主题
// ============================================
struct WeightInfoOk {
// 基础信息属性
long GrossDeviceID; // 毛重磅称编号
string GrossDeviceName; // 毛重磅称名称
string GrossDeviceType; // 毛重磅称类型 1:重磅 2:轻磅 3:通用称重 4:转煤
long TareDeviceID; // 皮重磅称编号
string TareDeviceName; // 皮重磅称名称
string TareDeviceType; // 皮重磅称类型 1:重磅 2:轻磅 3:通用称重 4:转煤
string EnterpriseName; // 本系统企业名称
// 业务单据属性
string BillNumber; // 票据号
string CarNumber; // 车牌号
string Supplier; // 往来单位
string GoodsType; // 品种
// 重量数据属性
float GrossWeight; // 毛重
string GrossTime; // 毛重时间
string GrossOperater; // 毛重操作员
float Tare; // 皮重
string TareTime; // 皮重时间
string TareOperater; // 皮重操作员
float Suttle; // 净重
// 扣重属性
float duduction1; // 扣矸 大宗物资扣吨打印
float duduction2; // 扣水 大宗物资扣钱打印
float duduction3; // 扣杂
// 物流信息属性
string INCoalYard; // 卸货点
string OutCoalYard; // 装货点
string BatchNumber; // 批次号
// 操作结果提示属性
string Warning; // 提示 LED显示
string Tips; // 提示 小票打印
// 打印磅单相关
string TicketType; // 磅单类型 1:一次称重 2:二次称重
boolean IsPrintTicker; // 是否打印磅单
// 绥阳铁合金称重成功扩展属性
string OrderNumber; // 订单号
string VehicleAndVesselNumber; // 车船号
string ReceiveCompany; // 收货单位
string TransportCompany; // 运输单位
};
// ============================================
// Topic: onWeightInfoErrorUpdate
// 称重业务成功信息更新主题
// ============================================
struct WeightInfoError {
//车牌
string CarNumber; // 车牌号
// 操作结果提示属性
string Warning; // 提示 字符串
};
// ============================================
// Topic: onBarCommandUpdate
// 拦车器命令更新主题
// ============================================
struct BarCommandUpdate {
// 前拦车器控制
long FrontBarSignalUp; // 前拦车器抬起信号 脉冲信号 1-》0 发1 自动置为0
long FrontBarSignalDown; // 前拦车器放下信号 脉冲信号 1-》0 发1 自动置为0
boolean FrontBarEnable; // 前拦车器是否启用 1 启用 0 不启用
// 后拦车器控制
long BackBarSignalUp; // 后拦车器抬起信号 脉冲信号 1-》0 发1 自动置为0 (属性ID: 7)
long BackBarSignalDown; // 后拦车器放下信号 脉冲信号 1-》0 发1 自动置为0
boolean BackBarEnable; // 后拦车器是否启用 1 启用 0 不启用
};
// ============================================
// Topic: onLightsCommandUpdate
// 红绿灯命令更新主题
// ============================================
struct LightsCommandUpdate {
// 前红绿灯控制
long FrontLEDSignal; // 前红绿灯信号 1.红 2.绿
boolean FrontLEDEnable; // 前红绿灯是否启用 1 启用 0 不启用
// 后红绿灯控制
long BackLEDSignal; // 后红绿灯信号 1.红 2.绿
long BackLEDEnable; // 后红绿灯是否启用 1 启用 0 不启用
};
// ============================================
// Topic: InfraredCommandUpdate
// 拦车器与红绿灯命令更新主题
// ============================================
struct InfraredCommandUpdate {
// 前红外对射控制
long FrontResistanceUnLock; // 前红外对射临时解除 1.解除 0.不解除
boolean FrontResistanceEnable; // 前红外对射启用 1 启用 0 不启用
// 后红外对射控制
long BackResistanceUnLock; // 后红外对射临时解除 1.解除 0.不解除
boolean BackResistanceEnable; // 后红外对射启用 1 启用 0 不启用
};
// ============================================
// Topic: onBarUpdate
// 拦车器更新主题
// ============================================
struct BarUpdate {
// 前拦车器状态
long FrontBarState; // 1 抬起状态 2 放下状态
// 后拦车器状态
long BackBarState; // 1 抬起状态 2 放下状态
};
// ============================================
// Topic: onLightsUpdate
// 红绿灯状态更新主题
// ============================================
struct LightsUpdate {
// 前红绿灯状态
long FrontLEDState; // 1.红 2.绿
// 后红绿灯状态
long BackLEDState; // 1.红 2.绿
};
// ============================================
// Topic: onInfraredUpdate
// 拦车器与红绿灯状态更新主题
// ============================================
struct InfraredUpdate {
// 前红外对射状态
long FrontResistanceSignal; // 1 有阻挡 0 无阻挡
// 后红外对射状态
long BackResistanceSignal; // 1 有阻挡 0 无阻挡
};
// ============================================
// Topic: LicenseSnap
// 车牌识别类
// ============================================
struct LicenseSnapUpdate {
long NewTag; // 车牌更新 1 新的 2 旧的不变
string License; // 车牌号
};
// ============================================
// Topic: LicenseSnap
// 语音播放ID
// ============================================
struct Voice {
long VoiceID; //语音ID
string VoiceContent; //语音string,后续如果可以程序用tts直接播放语音内容
};
// ============================================
// Topic: SummaryUpdate
// 称重类
// ============================================
struct SummaryUpdate {
string License; // 五彩湾为车牌号;绥阳铁合金为刷卡卡号
float StableValue; // 稳定重量;绥阳铁合金按吨传输
};
// ============================================
// Topic: ReadCardReq <-- 订阅 Topic (设备驱动侧)
// 类型: ReadCardReq
// 发布者: Core
// 订阅者: ReadCard
// 载荷: map<string, sequence<octet>>
// 协议键: "find" / "stop" / "read" / "write" / "beep" / "reset"
// ============================================
struct ReadCardReq
{
unsigned long index;
map<string, sequence<octet> > msg;
};
// ============================================
// Topic: ReadCardRsp <-- 发布 Topic (设备驱动侧)
// 类型: ReadCardRsp
// 发布者: ReadCard
// 订阅者: Core / MqttDds
// 载荷: map<string, sequence<octet>>
// 协议键: "find" / "read" / "write" / "stop" / "beep"
// ============================================
struct ReadCardRsp
{
unsigned long index;
map<string, sequence<octet> > msg;
};
// ============================================
// Topic: PrintReq <-- 发布 Topic (Core → Print)
// 类型: PrintReq
// 发布者: Core
// 订阅者: Print
// 载荷: map<string, string>
// ============================================
struct PrintReq
{
unsigned long index;
map<string, string> msg;
};
// ============================================
// Topic: PrintRsp <-- 发布 Topic (Print → Core)
// 类型: PrintRsp
// 发布者: Print
// 订阅者: Core
// 载荷: string
// ============================================
struct PrintRsp
{
unsigned long index;
string msg;
};
};
// ============================================
// 通用排队服务消息
// 排队设备通过 QueueTrigger 触发服务,服务发布 Success/Failure 结果。
// ============================================
module Queue {
// 排队机刷卡触发。只表达设备刷到的卡,不携带服务内部缓存定位字段。
struct QueueTrigger {
string message_id; // 可选技术消息号;重发时保持不变
string card_number; // 必填;刷卡得到的卡号
string device_id; // 必填;排队机/读卡器统一设备编号
string trigger_time; // 可选ISO-8601时间仅用于审计和去重
string vehicle_number_snapshot; // 可选;控件车牌快照,仅用于一致性校验
long supplier_identity_id_snapshot;// 可选0表示未提供
long goods_id_snapshot; // 可选0表示未提供
float ship_net_weight_snapshot; // 可选0表示未提供
long card_flow_no_snapshot; // 可选0表示未提供
string card_type_snapshot; // 可选;卡类型快照
string electronic_tag_snapshot; // 可选;电子标签由排队设备读取后传递
};
// 排队成功或活动记录补打成功结果。
struct QueueSuccess {
string message_id; // 可选;技术消息号
string card_number; // 必填;触发卡号
string device_id; // 必填;结果目标设备
long result_code; // 必填0新排队1补打
long queue_record_id; // 排队_列表主键
long queue_number; // 排队序号
string sample_machine; // 采样机名称
string queue_time; // 排入时间
string ticket_number; // 进煤表票据号
long sample_code; // 采样编码
string vehicle_number; // 正式车牌
long vehicle_self_no; // 车辆自编号
long vehicle_type_id; // 车型编号
long supplier_identity_id; // 供应识别号
string supplier_identity_name; // 供应识别名称
long supplier_id; // 供应商主键
string supplier_name; // 供应商名称
long goods_id; // 品种编号
string goods_name; // 品种名称
long unit_id; // 单位编号
long transport_company_id; // 运输公司编号
long sample_type; // 采样类型
string unloading_point_name; // 卸煤点名称
float ship_gross_weight; // 矿发毛重
float ship_tare_weight; // 矿发皮重
float ship_net_weight; // 矿发净重
long sample_machine_id; // 采样机编号无值为0
string vehicle_lane; // 车道名称
long vehicle_lane_id; // 车道编号无值为0
string strategy_desc; // 排队策略说明
string committed_at; // 数据库提交时间
string display_text; // 显示文本
string print_content; // 打印内容
boolean print_required; // 是否打印
long print_count; // 打印份数
long voice_id; // 语音资源编号
string voice_text; // 语音播报文本
boolean is_reprint; // 是否补打
string physical_card_state; // NOT_ATTEMPTED/CHANGED/PARTIAL
string card_write_status; // DISABLED/SUCCEEDED/FAILED/PARTIAL
};
// 排队失败结果。数据库已提交但事务外动作失败时仍携带已生成的业务编号。
struct QueueFailure {
string message_id; // 可选;技术消息号
string card_number; // 可解析时的卡号
string device_id; // 可识别时的设备编号
string error_code; // 必填;机器可判定错误码
string failed_step; // 必填;失败步骤
string message; // 必填;显示/告警文本
string vehicle_number; // 缓存车牌(可选)
long queue_record_id; // 已提交排队记录主键无记录为0
long queue_number; // 已生成排队号无记录为0
string sample_machine; // 已分配采样机
string ticket_number; // 已生成票据号
long existing_queue_record_id; // 活动排队记录主键
long existing_queue_number; // 活动排队号
string existing_sample_machine; // 活动采样机
string cache_state; // 缓存状态
string database_state; // NOT_ATTEMPTED/COMMITTED/ROLLED_BACK/UNKNOWN
string physical_card_state; // NOT_ATTEMPTED/CHANGED/UNCHANGED/PARTIAL/UNKNOWN
boolean retryable; // 是否允许同一触发重试
long retry_after_ms; // 建议重试等待时间
long voice_id; // 语音资源编号
string voice_text; // 语音播报文本
string card_write_status; // DISABLED/SUCCEEDED/FAILED/PARTIAL
};
};

@ -0,0 +1,179 @@
// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// 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.
/*!
* @file WeighingDDSTypeCdrAux.hpp
* This source file contains some definitions of CDR related functions.
*
* This file was generated by the tool fastddsgen.
*/
#ifndef FAST_DDS_GENERATED__QUEUE_WEIGHINGDDSTYPECDRAUX_HPP
#define FAST_DDS_GENERATED__QUEUE_WEIGHINGDDSTYPECDRAUX_HPP
#include "WeighingDDSType.hpp"
constexpr uint32_t WeighingSystem_PrintRsp_max_cdr_typesize {268UL};
constexpr uint32_t WeighingSystem_PrintRsp_max_key_cdr_typesize {0UL};
constexpr uint32_t WeighingSystem_SummaryUpdate_max_cdr_typesize {268UL};
constexpr uint32_t WeighingSystem_SummaryUpdate_max_key_cdr_typesize {0UL};
constexpr uint32_t Queue_QueueFailure_max_cdr_typesize {3932UL};
constexpr uint32_t Queue_QueueFailure_max_key_cdr_typesize {0UL};
constexpr uint32_t WeighingSystem_LightsUpdate_max_cdr_typesize {12UL};
constexpr uint32_t WeighingSystem_LightsUpdate_max_key_cdr_typesize {0UL};
constexpr uint32_t WeighingSystem_InfraredUpdate_max_cdr_typesize {12UL};
constexpr uint32_t WeighingSystem_InfraredUpdate_max_key_cdr_typesize {0UL};
constexpr uint32_t WeighingSystem_ReadCardRsp_max_cdr_typesize {16UL};
constexpr uint32_t WeighingSystem_ReadCardRsp_max_key_cdr_typesize {0UL};
constexpr uint32_t Queue_QueueSuccess_max_cdr_typesize {5028UL};
constexpr uint32_t Queue_QueueSuccess_max_key_cdr_typesize {0UL};
constexpr uint32_t WeighingSystem_WeightInfoError_max_cdr_typesize {524UL};
constexpr uint32_t WeighingSystem_WeightInfoError_max_key_cdr_typesize {0UL};
constexpr uint32_t WeighingSystem_WeightInfoOk_max_cdr_typesize {6020UL};
constexpr uint32_t WeighingSystem_WeightInfoOk_max_key_cdr_typesize {0UL};
constexpr uint32_t WeighingSystem_InfraredCommandUpdate_max_cdr_typesize {17UL};
constexpr uint32_t WeighingSystem_InfraredCommandUpdate_max_key_cdr_typesize {0UL};
constexpr uint32_t WeighingSystem_LightsCommandUpdate_max_cdr_typesize {20UL};
constexpr uint32_t WeighingSystem_LightsCommandUpdate_max_key_cdr_typesize {0UL};
constexpr uint32_t WeighingSystem_ReadCardReq_max_cdr_typesize {16UL};
constexpr uint32_t WeighingSystem_ReadCardReq_max_key_cdr_typesize {0UL};
constexpr uint32_t WeighingSystem_PrintReq_max_cdr_typesize {16UL};
constexpr uint32_t WeighingSystem_PrintReq_max_key_cdr_typesize {0UL};
constexpr uint32_t WeighingSystem_LicenseSnapUpdate_max_cdr_typesize {268UL};
constexpr uint32_t WeighingSystem_LicenseSnapUpdate_max_key_cdr_typesize {0UL};
constexpr uint32_t WeighingSystem_ScaleInfo_max_cdr_typesize {16UL};
constexpr uint32_t WeighingSystem_ScaleInfo_max_key_cdr_typesize {0UL};
constexpr uint32_t WeighingSystem_Voice_max_cdr_typesize {268UL};
constexpr uint32_t WeighingSystem_Voice_max_key_cdr_typesize {0UL};
constexpr uint32_t WeighingSystem_BarCommandUpdate_max_cdr_typesize {25UL};
constexpr uint32_t WeighingSystem_BarCommandUpdate_max_key_cdr_typesize {0UL};
constexpr uint32_t Queue_QueueTrigger_max_cdr_typesize {1840UL};
constexpr uint32_t Queue_QueueTrigger_max_key_cdr_typesize {0UL};
constexpr uint32_t WeighingSystem_ScaleCommand_max_cdr_typesize {12UL};
constexpr uint32_t WeighingSystem_ScaleCommand_max_key_cdr_typesize {0UL};
constexpr uint32_t WeighingSystem_BarUpdate_max_cdr_typesize {12UL};
constexpr uint32_t WeighingSystem_BarUpdate_max_key_cdr_typesize {0UL};
namespace eprosima {
namespace fastcdr {
class Cdr;
class CdrSizeCalculator;
eProsima_user_DllExport void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const WeighingSystem::ScaleInfo& data);
eProsima_user_DllExport void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const WeighingSystem::ScaleCommand& data);
eProsima_user_DllExport void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const WeighingSystem::WeightInfoOk& data);
eProsima_user_DllExport void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const WeighingSystem::WeightInfoError& data);
eProsima_user_DllExport void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const WeighingSystem::BarCommandUpdate& data);
eProsima_user_DllExport void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const WeighingSystem::LightsCommandUpdate& data);
eProsima_user_DllExport void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const WeighingSystem::InfraredCommandUpdate& data);
eProsima_user_DllExport void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const WeighingSystem::BarUpdate& data);
eProsima_user_DllExport void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const WeighingSystem::LightsUpdate& data);
eProsima_user_DllExport void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const WeighingSystem::InfraredUpdate& data);
eProsima_user_DllExport void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const WeighingSystem::LicenseSnapUpdate& data);
eProsima_user_DllExport void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const WeighingSystem::Voice& data);
eProsima_user_DllExport void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const WeighingSystem::SummaryUpdate& data);
eProsima_user_DllExport void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const WeighingSystem::ReadCardReq& data);
eProsima_user_DllExport void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const WeighingSystem::ReadCardRsp& data);
eProsima_user_DllExport void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const WeighingSystem::PrintReq& data);
eProsima_user_DllExport void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const WeighingSystem::PrintRsp& data);
eProsima_user_DllExport void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const Queue::QueueTrigger& data);
eProsima_user_DllExport void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const Queue::QueueSuccess& data);
eProsima_user_DllExport void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const Queue::QueueFailure& data);
} // namespace fastcdr
} // namespace eprosima
#endif // FAST_DDS_GENERATED__QUEUE_WEIGHINGDDSTYPECDRAUX_HPP

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save