李勇

修改对外接口,修改外部初始化的方法

此 diff 太大无法显示。
... ... @@ -31,7 +31,7 @@
"wbp": {
"project": "umd",
"entries": {
"main": "./MessageEngine.js"
"main": "./McuClientEngine.js"
},
"source": "src/",
"build": "dist/"
... ...
export default class Emiter {
constructor() {
this.MAPS = {};
... ... @@ -13,7 +14,7 @@ export default class Emiter {
}
off(eid, elistener) {
if (eid) {
let stub = this.MAPS[eid];
let stub =this.MAPS[eid];
if (stub) {
if (elistener) {
return stub.splice(stub.indexOf(elistener), 1);
... ... @@ -22,10 +23,11 @@ export default class Emiter {
}
}
}
emit(eid, data) {
_emit(eid, data) {
if (eid) {
//eid=* broadcast
let asteriskStub = this.MAPS['*'];
let asteriskStub =this.MAPS['*'];
console.log("asteriskStub");
if (asteriskStub && asteriskStub.length) {
asteriskStub.forEach(function (elistener) {
elistener(eid, data);
... ...
import Emiter from './Emiter';
import Sass from 'Sass';
import Mcu from 'mcu';
import MessageTypes from 'MessageTypes';
import Loger from 'Loger';
import ConferApe from 'apes/ConferApe';
import ChatApe from 'apes/ChatApe';
import VideoChat from 'apes/VideoApe';
import DocApe from 'apes/DocApe';
import WhiteBoardApe from 'apes/WhiteBoardApe';
import EngineUtils from "EngineUtils";
let loger = Loger.getLoger('MessageEntrance');
let info={"version":"v1.0.0","author":"3mang"};
let confInfo={};
let sass;
let mcu ;
let confer_ape;
let chat_ape;
let video_ape;
let doc_ape;
let wb_ape;
export default class MessageEntrance extends Emiter {
constructor() {
super();
this.info=info;
// 应用层会议信息
confInfo = {};
// Sass平台层
sass = Sass;
sass.on('*', (type, data) => this._emit(type, data));
sass.on(sass.SUCCESS, this._h5SassSuccessHandler.bind(this));
// 底层MCU消息层
mcu = Mcu;
mcu.on('*', (type, data) => this._emit(type, data));
mcu.on(MessageTypes.CONFERENCE_JOIN_SUCCESS, this._conferenceJoinSuccessHandler.bind(this));
// 注册所有应用Ape
confer_ape = new ConferApe();
confer_ape.on('*', (type, data) => this._emit(type, data));
confer_ape.on(MessageTypes.DOC_SWITCH, this.docSwitchHandler.bind(this));
chat_ape = new ChatApe();
chat_ape.on('*', (type, data) => this._emit(type, data));
video_ape = new VideoChat();
video_ape.on('*', (type, data) => this._emit(type, data));
doc_ape = new DocApe();
doc_ape.on('*', (type, data) => this._emit(type, data));
doc_ape.on(MessageTypes.DOC_UPDATE, this.docUpdateHandler.bind(this));
doc_ape.on(MessageTypes.DOC_DEL, this.docDeleteHandler.bind(this));
wb_ape = new WhiteBoardApe();
wb_ape.on('*', (type, data) => this._emit(type, data));
wb_ape.on(MessageTypes.ANNO_UPDATE, this.annoUpdateHandler.bind(this));
this.on(MessageTypes.DOC_SHOW, this.docShowHandler.bind(this));
this.sendChatMsg=this._sendChatMsg;
this.joinClass=this._joinClass;
}
// 进入会议
_joinClass(_confInfo) {
confInfo = _confInfo||{};
if(confInfo===null||EngineUtils.isEmptyObject(confInfo)){
loger.log('不能进入会议,传递的参数不对.',_confInfo);
return ;
}
if(sass){
sass.sassChecking(_confInfo);
}
}
// 离开会议
leaveClass() {
if(mcu){
mcu.leaveMCU();
}
}
// 通过SASS平台验证
_h5SassSuccessHandler() {
loger.log('加入底层MCU会议.'+confInfo.toString());
if(mcu){
mcu.joinMCU(confInfo);
}
}
// MCU 会议成功
_conferenceJoinSuccessHandler() {
if(sass){
sass.getClassDetail();
}
}
// 参会处理
conferenceHandler(msg_type) {
var msg = {
type: msg_type,
data: null
};
this._emit(msg.type, msg);
}
// 发送聊天消息
_sendChatMsg(to, msg) {
if (chat_ape) {
chat_ape.sendChatMsg(to, msg);
}
}
// 白板笔记更新
annoUpdateHandler(annoInfo) {
const activeDocId = confer_ape.activeDocId;
const docItem = doc_ape.docList[activeDocId];
if (docItem && annoInfo.id == docItem.wbid) {
this._emit(MessageTypes.DOC_ANNO, annoInfo);
}
}
// 文档变更-笔记处理
docShowHandler(docItem) {
loger.log('Doc Show ->' + docItem.id + '|' + docItem.curPageNo);
const annoInfo = wb_ape.annoInfos[docItem.wbid];
if (annoInfo) {
this._emit(MessageTypes.DOC_ANNO, annoInfo);
} else {
this._emit(MessageTypes.DOC_ANNO);
}
}
// 文档切换
docSwitchHandler() {
const activeDocId = confer_ape.activeDocId;
loger.log('Switch Doc Active -> ' + activeDocId);
const docItem = doc_ape.docList[activeDocId];
if (docItem) {
this._emit(MessageTypes.DOC_SHOW, docItem);
}
}
// 文档变更
docUpdateHandler(docItem) {
loger.log('Doc UpdateId ->' + docItem.id + '| activeDocId ->' + confer_ape.activeDocId);
if (docItem.id == confer_ape.activeDocId) {
this._emit(MessageTypes.DOC_SHOW, docItem);
}
}
//文档删除
docDeleteHandler(docItem){
if (docItem.id == confer_ape.activeDocId) {
this._emit(MessageTypes.DOC_DEL, docItem);
}
}
}
//MessageEntrance.MessageTypes = MessageTypes;
... ...
/**
* Created by hoopoe8 on 2017/1/8.
*/
class EngineUtils{
static isEmptyObject(O){
for (var x in O){
return false;
}
return true;
}
}
export default EngineUtils;
\ No newline at end of file
... ...
... ... @@ -52,9 +52,9 @@ class EverSocket extends Emiter {
_setConnected(isConn = true) {
this._connected = isConn;
if (this._connected) {
this.emit(EverSocket.OPEN);
this._emit(EverSocket.OPEN);
} else {
this.emit(EverSocket.CLOSED);
this._emit(EverSocket.CLOSED);
}
}
... ... @@ -117,7 +117,7 @@ class EverSocket extends Emiter {
this._lastActiveTime = Date.now();
const bufferData = messageEvent.data;
if (bufferData.byteLength > 0) {
this.emit(EverSocket.MESSAGE, bufferData);
this._emit(EverSocket.MESSAGE, bufferData);
}
}
... ...
import EngineEntrance from 'EngineEntrance';
import MessageTypes from 'MessageTypes';
const MCU_CLIENT=new EngineEntrance();
export function createMcuClient() {
return MCU_CLIENT;
}
export {MessageTypes};
... ...
import Emiter from './Emiter';
import h5Sass from 'Sass';
import mcu from 'mcu';
import MessageTypes from 'MessageTypes';
import Loger from 'Loger';
import ConferApe from 'apes/ConferApe';
import ChatApe from 'apes/ChatApe';
import VideoChat from 'apes/VideoApe';
import DocApe from 'apes/DocApe';
import WhiteBoardApe from 'apes/WhiteBoardApe';
let loger = Loger.getLoger('MessageEngine');
export default class MessageEngine extends Emiter {
constructor() {
super();
// 应用层会议信息
this.confInfo = null;
// Sass平台层
this.h5Sass = h5Sass;
this.h5Sass.on('*', (type, data) => this.emit(type, data));
this.h5Sass.on(h5Sass.SUCCESS, this._h5SassSuccessHandler.bind(this));
// 底层MCU消息层
this.mcu = mcu;
this.mcu.on('*', (type, data) => this.emit(type, data));
this.mcu.on(MessageTypes.CONFERENCE_JOIN_SUCCESS, this._conferenceJoinSuccessHandler.bind(this));
// 注册所有应用Ape
this.conferApe = new ConferApe();
this.conferApe.on('*', (type, data) => this.emit(type, data));
this.conferApe.on(MessageTypes.DOC_SWITCH, this.docSwitchHandler.bind(this));
this.chat_ape = new ChatApe();
this.chat_ape.on('*', (type, data) => this.emit(type, data));
this.video_ape = new VideoChat();
this.video_ape.on('*', (type, data) => this.emit(type, data));
this.doc_ape = new DocApe();
this.doc_ape.on('*', (type, data) => this.emit(type, data));
this.doc_ape.on(MessageTypes.DOC_UPDATE, this.docUpdateHandler.bind(this));
this.doc_ape.on(MessageTypes.DOC_DEL, this.docDeleteHandler.bind(this));
this.wb_ape = new WhiteBoardApe();
this.wb_ape.on('*', (type, data) => this.emit(type, data));
this.wb_ape.on(MessageTypes.ANNO_UPDATE, this.annoUpdateHandler.bind(this));
this.on(MessageTypes.DOC_SHOW, this.docShowHandler.bind(this));
//this.say = this.say.bind(this)
//this.hello = this.hello.bind(this)
this.init=this._init;
}
_init (id) {
console.log("Engine init "+id);
}
// 白板笔记更新
annoUpdateHandler(annoInfo) {
const activeDocId = this.conferApe.activeDocId;
const docItem = this.doc_ape.docList[activeDocId];
if (docItem && annoInfo.id == docItem.wbid) {
this.emit(MessageTypes.DOC_ANNO, annoInfo);
}
}
// 文档变更-笔记处理
docShowHandler(docItem) {
loger.log('Doc Show ->' + docItem.id + '|' + docItem.curPageNo);
const annoInfo = this.wb_ape.annoInfos[docItem.wbid];
if (annoInfo) {
this.emit(MessageTypes.DOC_ANNO, annoInfo);
} else {
this.emit(MessageTypes.DOC_ANNO);
}
}
// 文档切换
docSwitchHandler() {
const activeDocId = this.conferApe.activeDocId;
loger.log('Switch Doc Active -> ' + activeDocId);
const docItem = this.doc_ape.docList[activeDocId];
if (docItem) {
this.emit(MessageTypes.DOC_SHOW, docItem);
}
}
// 文档变更
docUpdateHandler(docItem) {
loger.log('Doc UpdateId ->' + docItem.id + '| activeDocId ->' + this.conferApe.activeDocId);
if (docItem.id == this.conferApe.activeDocId) {
this.emit(MessageTypes.DOC_SHOW, docItem);
}
}
//文档删除
docDeleteHandler(docItem){
if (docItem.id == this.conferApe.activeDocId) {
this.emit(MessageTypes.DOC_DEL, docItem);
}
}
// MCU 会议成功
_conferenceJoinSuccessHandler() {
this.h5Sass.getClassDetail();
}
// 通过SASS平台验证
_h5SassSuccessHandler() {
loger.log('加入底层MCU会议.');
this.mcu.joinMCU(this.confInfo);
}
// 进入会议
joinClass(_confInfo) {
this.confInfo = _confInfo;
this.h5Sass.sassChecking(_confInfo);
}
// 离开会议
leaveClass() {
this.mcu.leaveMCU();
}
// 参会处理
conferenceHandler(msg_type) {
var msg = {
type: msg_type,
data: null
};
this.emit(msg.type, msg);
}
// 发送聊天消息
sendChatMsg(to, msg) {
if (this.chat_ape) {
this.chat_ape.sendChatMsg(to, msg);
}
}
}
MessageEngine.MessageTypes = MessageTypes;
MessageEngine.data={
aa:"aa",
bb:11,
cc:"cccc"
};
... ... @@ -35,16 +35,14 @@ MessageTypes.VIDEO_SHOW = 'video.message';
MessageTypes.DOC_SHOW = 'document.message';
MessageTypes.DOC_SWITCH = 'document.switch';
MessageTypes.DOC_UPDATE = 'document.update';
MessageTypes.DOC_DEL='document.delete';
MessageTypes.DOC_ANNO = 'document.anno';
MessageTypes.CHAT_RECEIVE = 'chat.message';
MessageTypes.DOC_ANNO = 'document.anno';
MessageTypes.ANNO_UPDATE = 'anno_update';
MessageTypes.DOC_DEL='document.delete';
MessageTypes.AUDIO_SHOW='audio.message';
export default MessageTypes;
... ...
... ... @@ -3,10 +3,10 @@ import Loger from 'Loger';
import MessageTypes from 'MessageTypes';
// 日志对象
const loger = Loger.getLoger('H5Sass');
const loger = Loger.getLoger('Sass');
let confInfo = {};
class H5Sass extends Emiter {
class Sass extends Emiter {
constructor() {
super();
}
... ... @@ -14,10 +14,10 @@ class H5Sass extends Emiter {
// Sass校验
sassChecking(_confInfo) {
loger.log('发起Sass校验', _confInfo);
this.confInfo = _confInfo;
confInfo = _confInfo;
// 密码校验
if (this.confInfo.nopassword === 'true') {
if (confInfo.nopassword === 'true') {
return this.sendPWDChecking();
}
... ... @@ -27,7 +27,7 @@ class H5Sass extends Emiter {
// 入会校验
sendPWDChecking() {
let url = `http://${this.confInfo.portal}/3m/getCheckMeetinig.do?siteId=${this.confInfo.siteId}&classId=${this.confInfo.confId}&password=${this.confInfo.password}`;
let url = `http://${confInfo.portal}/3m/getCheckMeetinig.do?siteId=${confInfo.siteId}&classId=${confInfo.confId}&password=${confInfo.password}`;
loger.log('会议密码校验', url);
fetch(url, {
timeout: 5000
... ... @@ -37,14 +37,14 @@ class H5Sass extends Emiter {
return ret.text();
} else {
loger.error(`会议密码校验-网络异常.状态码:${ret.status}`);
this.emit(MessageTypes.NET_ERROR);
this._emit(MessageTypes.NET_ERROR);
throw '';
}
})
.then(ret => {
if (ret === 'false') {
loger.error(`会议密码校验-失败.`);
return this.emit(MessageTypes.CONFERENCE_SHOW_WRONG_PASSWORD);
return this._emit(MessageTypes.CONFERENCE_SHOW_WRONG_PASSWORD);
}
if (ret === 'true') {
loger.log(`会议密码校验-成功.`);
... ... @@ -52,17 +52,17 @@ class H5Sass extends Emiter {
return
}
loger.error(`会议密码校验-协议异常.`);
this.emit(MessageTypes.PRO_ERROR);
this._emit(MessageTypes.PRO_ERROR);
})
.catch(err => {
loger.error(`会议密码校验-异常.状态码:${err}`);
this.emit(MessageTypes.NET_ERROR);
this._emit(MessageTypes.NET_ERROR);
});
}
// 发起入会
sendMD5Checking() {
let url = `http://${this.confInfo.portal}/3m/meeting/md5CheckMeeting.do?siteId=${this.confInfo.siteId}&meetingNumber=${this.confInfo.confId}&userId=${this.confInfo.userId}&userName=${this.confInfo.userName}&userType=${this.confInfo.userType}&nopassword=${this.confInfo.nopassword}&md5=${this.confInfo.md5}`;
let url = `http://${confInfo.portal}/3m/meeting/md5CheckMeeting.do?siteId=${confInfo.siteId}&meetingNumber=${confInfo.confId}&userId=${confInfo.userId}&userName=${confInfo.userName}&userType=${confInfo.userType}&nopassword=${confInfo.nopassword}&md5=${confInfo.md5}`;
loger.log('H5SassMD5校验', url);
... ... @@ -74,7 +74,7 @@ class H5Sass extends Emiter {
return ret.json();
} else {
loger.error(`H5SassMD5校验-网络异常.状态码:${ret.status}`);
this.emit(MessageTypes.NET_ERROR);
this._emit(MessageTypes.NET_ERROR);
throw '';
}
})
... ... @@ -82,28 +82,31 @@ class H5Sass extends Emiter {
if (ret.flag == "true") {
if (ret.h5_mcu_list) {
let server = ret.h5_mcu_list.split(";")[0];
this.confInfo.MCUServerIP = server.split(":")[0];
this.confInfo.MCUServerPort = server.split(":")[1];
confInfo.MCUServerIP = server.split(":")[0];
confInfo.MCUServerPort = server.split(":")[1];
}
this.confInfo.maxVideoChannels = ret.maxVideoChannels;
this.confInfo.maxAudioChannels = ret.maxAudioChannels;
this.confInfo.maxMediaChannels = this.confInfo.maxVideoChannels + this.confInfo.maxAudioChannels;
console.log(ret);
confInfo.maxVideoChannels = ret.maxVideoChannels;
confInfo.maxAudioChannels = ret.maxAudioChannels;
confInfo.maxMediaChannels = confInfo.maxVideoChannels + confInfo.maxAudioChannels;
loger.log('H5Sass校验完成');
this.emit(H5Sass.SUCCESS);
this._emit(Sass.SUCCESS);
} else {
loger.log('H5SassMD5校验-失败.');
this.emit(MessageTypes.CONFERENCE_JOIN_FAILED);
this._emit(MessageTypes.CONFERENCE_JOIN_FAILED);
}
})
.catch(err => {
loger.error(`H5SassMD5校验-异常.状态码:${err}`);
this.emit(MessageTypes.NET_ERROR);
this._emit(MessageTypes.NET_ERROR);
console.log("aaaaaaaaaaaaaaaaaaa");
});
}
// 获取会议详情
getClassDetail() {
let url = `http://${this.confInfo.portal}/3m/meeting/getClassH5.do?classNumber=${this.confInfo.confId}`;
let url = `http://${confInfo.portal}/3m/meeting/getClassH5.do?classNumber=${confInfo.confId}`;
loger.log('H5Sass获取Class详情.', url);
... ... @@ -115,27 +118,27 @@ class H5Sass extends Emiter {
return ret.json();
} else {
loger.error(`H5Sass获取Class详情-网络异常.状态码:${ret.status}`);
this.emit(MessageTypes.NET_ERROR);
this._emit(MessageTypes.NET_ERROR);
throw '';
}
})
.then(ret => {
if (ret.errorCode === 0) {
loger.log('H5Sass获取Class详情完成');
this.emit(MessageTypes.CONFERENCE_SHOW_DETAIL, ret);
this._emit(MessageTypes.CONFERENCE_SHOW_DETAIL, ret);
} else {
loger.warn('H5Sass获取Class详情失败.');
this.emit(MessageTypes.NET_ERROR);
this._emit(MessageTypes.NET_ERROR);
}
})
.catch(err => {
loger.error(`H5Sass获取Class详情异常.状态码:${err}`);
this.emit(MessageTypes.NET_ERROR);
this._emit(MessageTypes.NET_ERROR);
});
}
}
H5Sass.prototype.SUCCESS = H5Sass.SUCCESS = 'h5sass.success';
Sass.prototype.SUCCESS = Sass.SUCCESS = 'h5sass.success';
export default new H5Sass;
export default new Sass;
... ...
... ... @@ -18,7 +18,7 @@ import ApeConsts from './ApeConsts';
import pdu from 'pdu';
import Loger from 'Loger';
import MessageTypes from 'MessageTypes';
import EngineUtils from "EngineUtils";
let loger = Loger.getLoger('ChatApe');
class ChatApe extends Ape {
... ... @@ -43,11 +43,16 @@ class ChatApe extends Ape {
}
sendChatMsg(to, message) {
if(this._confInfo===null||EngineUtils.isEmptyObject(this._confInfo)){
loger.log('发送聊天消息.', to, message,"Engine 还未初始化数据!");
return ;
}
loger.log('发送聊天消息.', to, message);
let chatSendPdu = new pdu['RCChatSendDataRequestPdu'];
chatSendPdu.type = pdu.RCPDU_CHAT_SEND_DATA_REQUEST;
chatSendPdu.initiator = this._confInfo.nodeId;
chatSendPdu.peer = to;
chatSendPdu.initiator = this._confInfo.nodeId;//发起人
chatSendPdu.peer = to;//发送给谁
chatSendPdu.isPublic = true;
chatSendPdu.userData = this._rCArrayBufferUtil.strToUint8Array("h5" + message);
chatSendPdu.fromName = this._rCArrayBufferUtil.strToUint8Array("h5" + this._confInfo.userName);
... ... @@ -71,7 +76,7 @@ class ChatApe extends Ape {
loger.log('接受聊天消息.', chatMsg);
this.emit(MessageTypes.CHAT_RECEIVE, chatMsg);
this._emit(MessageTypes.CHAT_RECEIVE, chatMsg);
}
}
... ...
... ... @@ -97,7 +97,7 @@ class ConferApe extends Ape {
if (tabTypeMatches.length > 1 && tabTypeMatches[1] == 'show.docsharing') {
if (tabInfo.match(/<visible>(.+)<\/visible>/)[1] == 'true') {
this.activeDocId = tabInfo.match(/<TabID>(.+)<\/TabID>/)[1];
this.emit(MessageTypes.DOC_SWITCH, this.activeDocId);
this._emit(MessageTypes.DOC_SWITCH, this.activeDocId);
}
}
} catch (e) {
... ... @@ -135,12 +135,12 @@ class ConferApe extends Ape {
this.emitRosterChange();
// 自己退出
if (nodeId == this._confInfo.nodeId) {
this.emit(MessageTypes.CONFERENCE_EXIT);
this._emit(MessageTypes.CONFERENCE_EXIT);
}
}
emitRosterChange() {
this.emit(MessageTypes.CONFERENCE_SHOW_ROSTER_NUM, Object.keys(this.rosters).length);
this._emit(MessageTypes.CONFERENCE_SHOW_ROSTER_NUM, Object.keys(this.rosters).length);
}
}
... ...
... ... @@ -46,7 +46,7 @@ class DocApe extends Ape {
tableDeleteHandler(tableId, record){
const re={};
re.type=ApeConsts.DOCUMENT_DEL;
this.emit(MessageTypes.DOC_DEL, re);
this._emit(MessageTypes.DOC_DEL, re);
}
tableUpdateHandler(owner, recordId, recordData) {
try {
... ... @@ -65,7 +65,7 @@ class DocApe extends Ape {
recordInfo.loadURL = `${recordInfo.namePath}/${recordInfo.curPageNo}.jpg`;
}
this.docList[recordId] = recordInfo;
this.emit(MessageTypes.DOC_UPDATE, recordInfo);
this._emit(MessageTypes.DOC_UPDATE, recordInfo);
loger.log('Doc update ->' + recordId);
} catch (e) {
loger.warn('Doc Table Update Decode包异常');
... ...
... ... @@ -60,7 +60,7 @@ class VideoChat extends Ape {
// this._notify(RCApeEvent.E_VIDEO_DATA, videoReceivePdu.sessionId, videoReceivePdu.channelId, video_data);
loger.log('接受视频消息.', video_data);
this.emit(MessageTypes.VIDEO_SHOW, video_data);
this._emit(MessageTypes.VIDEO_SHOW, video_data);
}
... ... @@ -101,7 +101,7 @@ class VideoChat extends Ape {
}
emitVideoChange() {
this.emit(MessageTypes.VIDEO_SHOW, {
this._emit(MessageTypes.VIDEO_SHOW, {
activeChannelId: this.activeChannelId,
HLSURL: this.activeURL,
});
... ...
... ... @@ -63,7 +63,7 @@ class WhiteBoardApe extends Ape {
svg: UTF8.getStringFromBytes(uncompressedBytes)
};
this.annoInfos[recordId] = annoInfo;
this.emit(MessageTypes.ANNO_UPDATE, annoInfo);
this._emit(MessageTypes.ANNO_UPDATE, annoInfo);
} else {
loger.log('白板动作忽略,类型:', ApeConsts(recordInfo.type));
}
... ...
... ... @@ -22,5 +22,5 @@ import dfjsd from 'Loger';
import fdsfds from 'mcu';
import alexwang from 'MessageEngine.js';
import alexwang from 'EngineEntrance.js';
... ...
... ... @@ -83,10 +83,10 @@ class MCU extends Emiter {
switch (pduResultCode) {
case PduConsts.RET_SUCCESS:
this._updateMCUConfInfoDesc(joinConfPdu.get("confDesc"));
this.emit(MessageTypes.CONFERENCE_JOIN_SUCCESS, this.confInfo);
this._emit(MessageTypes.CONFERENCE_JOIN_SUCCESS, this.confInfo);
break;
case PduConsts.RET_FULL_CAPACITY:
this.emit(MessageTypes.CONFERENCE_JOIN_FULL);
this._emit(MessageTypes.CONFERENCE_JOIN_FULL);
break;
default:
loger.warn('JoinConfPdu-未知类型-等待处理.', pduResultCode);
... ... @@ -98,7 +98,7 @@ class MCU extends Emiter {
if (ape) {
let subTypeLabel = pdu.id2type(pduMsg.subType);
loger.log('MCU-SecondLayer封装消息', 'sessionId', sessionLabel, pduMsg.sessionId, 'subtype', subTypeLabel, pduMsg.subType);
ape.emit(pduMsg.subType, pduMsg.data);
ape._emit(pduMsg.subType, pduMsg.data);
} else {
loger.warn(sessionLabel + '尚未注册');
}
... ...
... ... @@ -2,7 +2,7 @@ module.exports = function (umdConf) {
umdConf.devServer.host = '0.0.0.0';
//umdConf.webpackFeatures.enableEntryHTML();//生成
umdConf.output.publicPath = '';
umdConf.output.library = 'MessageEngine';
umdConf.output.library = 'MCUClientEngine';
//console.dir(umdConf);
... ...