Skip to content

Commit 4353a51

Browse files
authored
core _null fix (#1051)
* Create draft PR for #1050 * create new issue script modified, clean dev check added * wip * _NULL_MESSENGER_SERVICE test passed localy * Remove commented-out IAxoMessagingServices declaration from NULL_MESSENGER_SERVICE
1 parent d8f2ec6 commit 4353a51

4 files changed

Lines changed: 22 additions & 4 deletions

File tree

scripts/create_new_issue.ps1

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,21 @@ param
44
[string]$IssueBody
55
)
66

7+
# Get the current script directory
8+
$scriptDir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
9+
# Construct the full path to _is_on_dev_nothing_to_commit.ps1
10+
$_is_on_dev_nothing_to_commit = Join-Path -Path $scriptDir -ChildPath "_is_on_dev_nothing_to_commit.ps1"
11+
12+
# Call _is_on_dev_nothing_to_commit.ps1
13+
$is_on_dev_nothing_to_commit = & $_is_on_dev_nothing_to_commit
14+
15+
if($is_on_dev_nothing_to_commit -ne 1)
16+
{
17+
Write-Host "You are not currently on the 'dev' branch, or you have some uncommited changes " -ForegroundColor Red
18+
Write-Host "Commit your local changes, sync your local 'dev' branch with the remote and start this script again." -ForegroundColor Red
19+
exit 1
20+
}
21+
722
if (-not $IssueTitle)
823
{
924
$IssueTitle = Read-Host "Please enter an issue title."

src/core/ctrl/src/AxoMessaging/Static/AxoMessengerService.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ USING AXOpen.Messaging.Static;
55

66
NAMESPACE AXOpen.Messaging
77
{S7.extern=ReadWrite}
8-
CLASS PUBLIC AxoMessengerService EXTENDS AxoObject IMPLEMENTS IAxoMessagingServices
8+
CLASS PUBLIC AxoMessengerService EXTENDS AxoObject IMPLEMENTS AXOpen.Core.IAxoMessagingServices
99
VAR PRIVATE
1010
_messages : REF_TO ARRAY[*] OF REF_TO AxoMessenger; // Array to hold message references
1111
_nextMessageIndex : DINT;

src/core/ctrl/src/Mocks/MockAxoContext.st

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ NAMESPACE AXOpen.Core.Dummies
144144

145145
VAR PRIVATE
146146
NULL_MESSENGER_SERVICE : _NULL_MESSENGER_SERVICE;
147+
// NULL_MESSENGER_SERVICE : IAxoMessagingServices;
147148
_messengerService : IAxoMessagingServices;
148149
END_VAR
149150

src/core/ctrl/src/abstractions/NULLs.st

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ NAMESPACE AXOpen.Core
4747
END_METHOD
4848
END_CLASS
4949

50-
50+
INTERFACE IAxoNullObject EXTENDS IAxoObject END_INTERFACE
5151

5252
///<summary>
5353
/// Provides an empty object for uninitialized objects.
5454
///</summary>
55-
CLASS PUBLIC _NULL_OBJECT IMPLEMENTS IAxoObject
55+
CLASS PUBLIC _NULL_OBJECT IMPLEMENTS IAxoNullObject
5656
VAR PRIVATE
5757
{S7.extern=Hidden}
5858
NULL_CONTEXT : _NULL_CONTEXT;
@@ -156,11 +156,13 @@ NAMESPACE AXOpen.Core
156156
END_METHOD
157157
END_CLASS
158158

159+
INTERFACE PUBLIC IAxoNullMessagingServices EXTENDS IAxoMessagingServices END_INTERFACE
160+
159161
///<summary>
160162
/// Provides an empty RTC object for uninitialized RTC.
161163
///</summary>
162164
{S7.extern=ReadWrite}
163-
CLASS PUBLIC _NULL_MESSENGER_SERVICE IMPLEMENTS IAxoMessagingServices
165+
CLASS PUBLIC _NULL_MESSENGER_SERVICE IMPLEMENTS IAxoNullMessagingServices
164166
// Due to compiler issues with interface inheritance, we will temporarily implement methods related to messaging suspension also here.
165167
METHOD PUBLIC QueueMessage : BOOL
166168
VAR_INPUT

0 commit comments

Comments
 (0)