/home/runner/work/pgec/pgec/_site/ct/ct_run.ct_pgec@fv-az651-965.2023-12-04_14.30.54/pgec_mcd_emulator.COVER.html

1 %% Copyright (c) 2022 Peter Morgan <peter.james.morgan@gmail.com>
2 %%
3 %% Licensed under the Apache License, Version 2.0 (the "License");
4 %% you may not use this file except in compliance with the License.
5 %% You may obtain a copy of the License at
6 %%
7 %% http://www.apache.org/licenses/LICENSE-2.0
8 %%
9 %% Unless required by applicable law or agreed to in writing, software
10 %% distributed under the License is distributed on an "AS IS" BASIS,
11 %% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 %% See the License for the specific language governing permissions and
13 %% limitations under the License.
14
15
16 -module(pgec_mcd_emulator).
17
18
19 -export([expire/1]).
20 -export([flush_all/1]).
21 -export([init/1]).
22 -export([recv/1]).
23 -include_lib("kernel/include/logger.hrl").
24 -include_lib("stdlib/include/ms_transform.hrl").
25
26
27 init([]) ->
28 8 {ok, #{}}.
29
30 recv(#{message := #{header := _}}) ->
31
:-(
stop;
32
33 recv(#{message := #{meta := _}}) ->
34
:-(
stop;
35
36 recv(#{message := #{command := _}} = Arg) ->
37 4 ?LOG_DEBUG(#{arg => Arg}),
38 4 pgec_mcd_emulator_text:recv(Arg).
39
40
41 expire(_) ->
42
:-(
ok.
43
44
45 flush_all(_) ->
46
:-(
ok.
Line Hits Source