Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
platform
/
platform-charging-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 0d9c080d
authored
Nov 03, 2023
by
tiger
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
增加notify机制
1 parent
93a6874e
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
30 deletions
platform-charging/src/main/java/cn/com/glsx/charging/modules/gbt/ocpp16/tcp/base/TcpNotify.java
platform-charging/src/main/java/cn/com/glsx/charging/modules/gbt/ocpp16/tcp/handler/notify/DefaultNotifyHandler.java
platform-charging/src/main/java/cn/com/glsx/charging/modules/gbt/ocpp16/tcp/handler/rsp/DefaultRspHandler.java
platform-charging/src/main/java/cn/com/glsx/charging/modules/gbt/ocpp16/tcp/handler/rsp/LoginRspHandler.java
platform-charging/src/main/java/cn/com/glsx/charging/modules/gbt/ocpp16/tcp/base/TcpNotify.java
0 → 100644
View file @
0d9c080
package
cn
.
com
.
glsx
.
charging
.
modules
.
gbt
.
ocpp16
.
tcp
.
base
;
import
lombok.Getter
;
import
lombok.Setter
;
/**
* 由平台向终端推送通知
*
* @author kome
* @date 2023年11月3日 下午3:58:59
* @param <D>
*/
@Getter
@Setter
public
class
TcpNotify
<
D
extends
TcpData
>
extends
TcpBase
<
D
>
{
public
TcpNotify
(
byte
type
)
{
super
(
type
);
}
public
TcpNotify
()
{
this
(
TcpMapper
.
CMD_BLANK
.
getType
());
}
}
platform-charging/src/main/java/cn/com/glsx/charging/modules/gbt/ocpp16/tcp/handler/notify/DefaultNotifyHandler.java
0 → 100644
View file @
0d9c080
package
cn
.
com
.
glsx
.
charging
.
modules
.
gbt
.
ocpp16
.
tcp
.
handler
.
notify
;
import
cn.com.glsx.charging.modules.gbt.ocpp16.tcp.base.TcpBase
;
import
cn.com.glsx.charging.modules.gbt.ocpp16.tcp.base.TcpData
;
import
cn.com.glsx.charging.modules.gbt.ocpp16.tcp.base.TcpHandler
;
import
cn.com.glsx.charging.modules.gbt.ocpp16.tcp.base.TcpNotify
;
import
io.netty.channel.Channel
;
public
class
DefaultNotifyHandler
implements
TcpHandler
<
TcpNotify
<
TcpData
>,
TcpBase
<
TcpData
>>
{
@Override
public
TcpBase
<
TcpData
>
handle
(
Channel
channel
,
TcpNotify
<
TcpData
>
notify
)
{
// TODO client端收到notify后怎么处理
return
null
;
}
}
platform-charging/src/main/java/cn/com/glsx/charging/modules/gbt/ocpp16/tcp/handler/rsp/DefaultRspHandler.java
View file @
0d9c080
package
cn
.
com
.
glsx
.
charging
.
modules
.
gbt
.
ocpp16
.
tcp
.
handler
.
rsp
;
package
cn
.
com
.
glsx
.
charging
.
modules
.
gbt
.
ocpp16
.
tcp
.
handler
.
rsp
;
import
cn.com.glsx.charging.modules.gbt.ocpp16.tcp.base.TcpBase
;
import
cn.com.glsx.charging.modules.gbt.ocpp16.tcp.base.TcpData
;
import
cn.com.glsx.charging.modules.gbt.ocpp16.tcp.base.TcpHandler
;
import
cn.com.glsx.charging.modules.gbt.ocpp16.tcp.base.TcpHandler
;
import
cn.com.glsx.charging.modules.gbt.ocpp16.tcp.data.LoginRspData
;
import
cn.com.glsx.charging.modules.gbt.ocpp16.tcp.base.TcpRsp
;
import
cn.com.glsx.charging.modules.gbt.ocpp16.tcp.protocol.LoginRsp
;
import
io.netty.channel.Channel
;
import
io.netty.channel.Channel
;
public
class
DefaultRspHandler
implements
TcpHandler
<
LoginRsp
,
LoginRsp
>
{
public
class
DefaultRspHandler
implements
TcpHandler
<
TcpRsp
<
TcpData
>,
TcpBase
<
TcpData
>
>
{
@Override
@Override
public
LoginRsp
handle
(
Channel
channel
,
LoginRsp
req
)
{
public
TcpBase
<
TcpData
>
handle
(
Channel
channel
,
TcpRsp
<
TcpData
>
rsp
)
{
LoginRsp
trsp
=
new
LoginRsp
();
// TODO client端收到rsp后怎么处理
return
null
;
LoginRspData
data
=
new
LoginRspData
();
data
.
setPointId
(
null
);
data
.
setResult
((
byte
)
0
);
// SpringContextUtil.getApplicationContext().getBean(null);
log
.
info
(
"xxxx"
);
trsp
.
setData
(
data
);
return
trsp
;
}
}
}
}
platform-charging/src/main/java/cn/com/glsx/charging/modules/gbt/ocpp16/tcp/handler/rsp/LoginRspHandler.java
View file @
0d9c080
package
cn
.
com
.
glsx
.
charging
.
modules
.
gbt
.
ocpp16
.
tcp
.
handler
.
rsp
;
package
cn
.
com
.
glsx
.
charging
.
modules
.
gbt
.
ocpp16
.
tcp
.
handler
.
rsp
;
import
cn.com.glsx.charging.modules.gbt.ocpp16.tcp.base.TcpBase
;
import
cn.com.glsx.charging.modules.gbt.ocpp16.tcp.base.TcpData
;
import
cn.com.glsx.charging.modules.gbt.ocpp16.tcp.base.TcpHandler
;
import
cn.com.glsx.charging.modules.gbt.ocpp16.tcp.base.TcpHandler
;
import
cn.com.glsx.charging.modules.gbt.ocpp16.tcp.data.LoginRspData
;
import
cn.com.glsx.charging.modules.gbt.ocpp16.tcp.protocol.LoginRsp
;
import
cn.com.glsx.charging.modules.gbt.ocpp16.tcp.protocol.LoginRsp
;
import
io.netty.channel.Channel
;
import
io.netty.channel.Channel
;
public
class
LoginRspHandler
implements
TcpHandler
<
LoginRsp
,
LoginRsp
>
{
public
class
LoginRspHandler
implements
TcpHandler
<
LoginRsp
,
TcpBase
<
TcpData
>
>
{
@Override
@Override
public
LoginRsp
handle
(
Channel
channel
,
LoginRsp
req
)
{
public
TcpBase
<
TcpData
>
handle
(
Channel
channel
,
LoginRsp
req
)
{
LoginRsp
trsp
=
new
LoginRsp
();
LoginRspData
data
=
new
LoginRspData
();
return
null
;
data
.
setPointId
(
null
);
data
.
setResult
((
byte
)
0
);
// SpringContextUtil.getApplicationContext().getBean(null);
log
.
info
(
"xxxx"
);
trsp
.
setData
(
data
);
return
trsp
;
}
}
}
}
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment