Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
clean-libraries
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
3
Issues
3
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
clean-and-itasks
clean-libraries
Commits
072f056b
Commit
072f056b
authored
Aug 15, 2018
by
John van Groningen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use case instead of u_isNothing and fromJust (u_isNothing will probably be renamed or removed)
parent
12d6a55e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
19 deletions
+18
-19
Libraries/ObjectIO/ObjectIO/receiverdevice.icl
Libraries/ObjectIO/ObjectIO/receiverdevice.icl
+18
-19
No files found.
Libraries/ObjectIO/ObjectIO/receiverdevice.icl
View file @
072f056b
...
...
@@ -175,25 +175,24 @@ where
// MW11..
letOneReceiverDoInetEvent
(
eventCode
,
endpointRef
,
inetReceiverCategory
,
misc
)
rsHs
pState
#
(
opt_rsH
,
rsHs
)
=
selectReceiver
(
endpointRef
,
inetReceiverCategory
)
rsHs
(
nothing
,
opt_rsH
)
=
u_isNothing
opt_rsH
|
nothing
/* PA: receiver device must be restored, because it is removed from the IOSt
= pState // No ioSetReceiverDevice needed, because nothing has been changed
*/
=
appPIO
(
ioStSetDevice
(
ReceiverSystemState
{
rReceivers
=
rsHs
}))
pState
#
eventInfo
=
(
eventCode
,
endpointRef
,
misc
)
#
rsH
=
fromJust
opt_rsH
#
(
rSelect
,
emptyASMQ
,
inetRId
,
rsH
)
=
(\
rsH
=:{
rHandle
=
rH
=:{
rSelect
,
rASMQ
}}->(
rSelect
,
isEmpty
rASMQ
,
getInetReceiverRId
rH
,
rsH
))
rsH
|
enabled
rSelect
&&
emptyASMQ
=
applyInetEvent
eventInfo
rsH
rsHs
pState
// apply the event immediately
// receiver is unable, so queue the event via asyncSend to handle it later
#
receivers
=
ReceiverSystemState
{
rReceivers
=[
rsH
:
rsHs
]}
// left at the beginning
pState
=
appPIO
(
ioStSetDevice
receivers
)
pState
#
(
sR
,
pState
)
=
asyncSend
inetRId
eventInfo
pState
|
sR
<>
SendOk
=
abort
"receiverdevice: I have a bug (78)"
|
otherwise
=
pState
=
case
opt_rsH
of
Nothing
// PA: receiver device must be restored, because it is removed from the IOSt
->
appPIO
(
ioStSetDevice
(
ReceiverSystemState
{
rReceivers
=
rsHs
}))
pState
Just
rsH
#
eventInfo
=
(
eventCode
,
endpointRef
,
misc
)
#
(
rSelect
,
emptyASMQ
,
inetRId
,
rsH
)
=
(\
rsH
=:{
rHandle
=
rH
=:{
rSelect
,
rASMQ
}}->(
rSelect
,
isEmpty
rASMQ
,
getInetReceiverRId
rH
,
rsH
))
rsH
|
enabled
rSelect
&&
emptyASMQ
->
applyInetEvent
eventInfo
rsH
rsHs
pState
// apply the event immediately
// receiver is unable, so queue the event via asyncSend to handle it later
#
receivers
=
ReceiverSystemState
{
rReceivers
=[
rsH
:
rsHs
]}
// left at the beginning
pState
=
appPIO
(
ioStSetDevice
receivers
)
pState
#
(
sR
,
pState
)
=
asyncSend
inetRId
eventInfo
pState
|
sR
<>
SendOk
->
abort
"receiverdevice: I have a bug (78)"
|
otherwise
->
pState
where
selectReceiver
::
!(!
EndpointRef`
,!
InetReceiverCategory`
)
!*[
ReceiverStateHandle
.
pst
]
->
(!*
Maybe
(
ReceiverStateHandle
.
pst
),!*[
ReceiverStateHandle
.
pst
])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
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 comment