Skip to content
Snippets Groups Projects
Commit 21fbf618 authored by Kim Mundel's avatar Kim Mundel
Browse files

Creating Repo

parents
No related branches found
No related tags found
No related merge requests found
Showing
with 923 additions and 0 deletions
.DS_Store 0 → 100644
File added
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="Internetworking" />
</profile>
</annotationProcessing>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="https://repo.maven.apache.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_19" default="true" project-jdk-name="18" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AutoImportSettings">
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="ec1f6817-32e7-4584-917c-27c18486f51e" name="Changes" comment="Simple test examples">
<change afterPath="$PROJECT_DIR$/.idea/compiler.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/encodings.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/jarRepositories.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/uiDesigner.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/apps/MonolithicEchoPhyClient.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/apps/MonolithicEchoPhyServer.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/apps/PhyAllInOne.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/apps/PhyPingClient.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/apps/PhyPingServer.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/apps/SLPClient.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/apps/SLPDirectClient.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/apps/SLPStudentClient.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/apps/SLPStudentClient.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/apps/SLPSwitch.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/apps/SLPSwitch.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/apps/SimplexPhyClient.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/apps/SimplexPhyServer.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/apps/UDPAllInOne.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/apps/UDPClientRunnable.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/apps/UDPEchoClient.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/apps/UDPEchoServer.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/apps/UDPServerRunnable.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/slp/SLPDataMsg.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/slp/SLPDataMsg.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/slp/SLPDisturbance.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/slp/SLPMsg.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/slp/SLPMsg.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/slp/SLPProtocol.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/slp/SLPProtocol.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/slp/SLPRegMsg.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/slp/SLPRegMsg.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/slp/SLPRegResponseMsg.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/slp/SLPRegResponseMsg.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/test/java/phy/PhyMsgTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/phy/PhyMsgTest.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/test/java/phy/SLPClientReceiveTask3Test.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/test/java/phy/SLPClientRegisterTask5Test.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/test/java/phy/SLPClientSendTask3Test.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/test/java/phy/SLPSwitchDataMsgForwardingTask4Test.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/test/java/phy/SLPSwitchRegistrationHandlingTask4Test.java" beforeDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="CodeStyleSettingsInfer">
<option name="done" value="true" />
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="JUnit5 Test Class" />
<option value="Class" />
</list>
</option>
</component>
<component name="Git.Settings">
<option name="RECENT_BRANCH_BY_REPOSITORY">
<map>
<entry key="$PROJECT_DIR$" value="true_stack" />
</map>
</option>
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
<option name="UPDATE_TYPE" value="REBASE" />
</component>
<component name="MarkdownSettingsMigration">
<option name="stateVersion" value="1" />
</component>
<component name="MavenImportPreferences">
<option name="generalSettings">
<MavenGeneralSettings>
<option name="useMavenConfig" value="true" />
</MavenGeneralSettings>
</option>
</component>
<component name="ProblemsViewState">
<option name="selectedTabId" value="CurrentFile" />
</component>
<component name="ProjectCodeStyleSettingsMigration">
<option name="version" value="2" />
</component>
<component name="ProjectId" id="2DFRiA5ig8BUQiWgWjgxSSdt6PU" />
<component name="ProjectLevelVcsManager" settingsEditedManually="true">
<ConfirmationsSetting value="2" id="Add" />
</component>
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"ASKED_ADD_EXTERNAL_FILES": "true",
"ASKED_SHARE_PROJECT_CONFIGURATION_FILES": "true",
"RunOnceActivity.OpenProjectViewOnStart": "true",
"RunOnceActivity.ShowReadmeOnStart": "true",
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
"WebServerToolWindowFactoryState": "false",
"com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary": "JUnit5",
"com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrarySuperClass.JUnit5": "",
"last_opened_file_path": "/Users/lecture/IdeaProjects/Internetworking",
"node.js.detected.package.eslint": "true",
"node.js.detected.package.tslint": "true",
"node.js.selected.package.eslint": "(autodetect)",
"node.js.selected.package.tslint": "(autodetect)",
"nodejs_package_manager_path": "npm",
"project.structure.last.edited": "Modules",
"project.structure.proportion": "0.15",
"project.structure.side.proportion": "0.3873045",
"run.code.analysis.last.selected.profile": "pProject Default",
"settings.editor.selected.configurable": "reference.projectsettings.compiler.javacompiler",
"vue.rearranger.settings.migration": "true"
}
}]]></component>
<component name="RecentsManager">
<key name="CreateClassDialog.RecentsKey">
<recent name="slp" />
<recent name="exceptions" />
</key>
<key name="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/src/test/java/phy" />
<recent name="$PROJECT_DIR$/src/main/java/apps" />
<recent name="$PROJECT_DIR$/src/main/java/slp" />
<recent name="$PROJECT_DIR$/src/main/java/phy" />
<recent name="$PROJECT_DIR$/src/main/java/exceptions" />
</key>
<key name="CreateTestDialog.Recents.Supers">
<recent name="" />
</key>
<key name="MoveClassesOrPackagesDialog.RECENTS_KEY">
<recent name="phy" />
</key>
<key name="CreateTestDialog.RecentsKey">
<recent name="slp" />
</key>
</component>
<component name="RunManager" selected="JUnit.SLPClientRegisterTask2Test">
<configuration name="PhyAllInOne" type="Application" factoryName="Application" singleton="false" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="apps.PhyAllInOne" />
<module name="Internetworking" />
<option name="PROGRAM_PARAMETERS" value="2000" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="apps.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="SLPStudentClient" type="Application" factoryName="Application" singleton="false" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="apps.SLPStudentClient" />
<module name="Internetworking" />
<option name="PROGRAM_PARAMETERS" value="5000" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="apps.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="SimplexPhyClient" type="Application" factoryName="Application" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="apps.SimplexPhyClient" />
<module name="Internetworking" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="apps.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="UDPAllInOne" type="Application" factoryName="Application" singleton="false" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="apps.UDPAllInOne" />
<module name="Internetworking" />
<option name="PROGRAM_PARAMETERS" value="1000" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="apps.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="UDPEchoClient" type="Application" factoryName="Application" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="apps.UDPEchoClient" />
<module name="Internetworking" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="apps.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="PhyMsgTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
<module name="Internetworking" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="phy.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<option name="PACKAGE_NAME" value="phy" />
<option name="MAIN_CLASS_NAME" value="phy.PhyMsgTest" />
<option name="TEST_OBJECT" value="class" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="PhyMsgTest.createTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
<module name="Internetworking" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="phy.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<option name="PACKAGE_NAME" value="phy" />
<option name="MAIN_CLASS_NAME" value="phy.PhyMsgTest" />
<option name="METHOD_NAME" value="createTest" />
<option name="TEST_OBJECT" value="method" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="SLPClientRegisterTask2Test" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
<module name="Internetworking" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="phy.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<option name="PACKAGE_NAME" value="phy" />
<option name="MAIN_CLASS_NAME" value="phy.SLPClientRegisterTask2Test" />
<option name="TEST_OBJECT" value="class" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="SLPClientRegisterTask2Test.RegistrationSuccessfulTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
<module name="Internetworking" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="phy.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<option name="PACKAGE_NAME" value="phy" />
<option name="MAIN_CLASS_NAME" value="phy.SLPClientRegisterTask2Test" />
<option name="METHOD_NAME" value="RegistrationSuccessfulTest" />
<option name="TEST_OBJECT" value="method" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="SLPClientRegisterTask2Test.testRegistrationFailedExceptionIsThrownWhenReceivingAMalformedMessage" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
<module name="Internetworking" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="phy.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<option name="PACKAGE_NAME" value="phy" />
<option name="MAIN_CLASS_NAME" value="phy.SLPClientRegisterTask2Test" />
<option name="METHOD_NAME" value="testRegistrationFailedExceptionIsThrownWhenReceivingAMalformedMessage" />
<option name="TEST_OBJECT" value="method" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<list>
<item itemvalue="Application.SimplexPhyClient" />
<item itemvalue="Application.UDPEchoClient" />
<item itemvalue="Application.PhyAllInOne" />
<item itemvalue="Application.SLPStudentClient" />
<item itemvalue="Application.UDPAllInOne" />
<item itemvalue="JUnit.PhyMsgTest" />
<item itemvalue="JUnit.SLPClientRegisterTask2Test" />
<item itemvalue="JUnit.PhyMsgTest.createTest" />
<item itemvalue="JUnit.SLPClientRegisterTask2Test.testRegistrationFailedExceptionIsThrownWhenReceivingAMalformedMessage" />
<item itemvalue="JUnit.SLPClientRegisterTask2Test.RegistrationSuccessfulTest" />
</list>
<recent_temporary>
<list>
<item itemvalue="JUnit.SLPClientRegisterTask2Test" />
<item itemvalue="JUnit.SLPClientRegisterTask2Test.RegistrationSuccessfulTest" />
<item itemvalue="JUnit.PhyMsgTest" />
<item itemvalue="JUnit.SLPClientRegisterTask2Test.testRegistrationFailedExceptionIsThrownWhenReceivingAMalformedMessage" />
<item itemvalue="JUnit.PhyMsgTest.createTest" />
</list>
</recent_temporary>
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="ec1f6817-32e7-4584-917c-27c18486f51e" name="Changes" comment="" />
<created>1660292970805</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1660292970805</updated>
<workItem from="1682064546786" duration="1614000" />
</task>
<task id="LOCAL-00001" summary="New project structure">
<created>1660550384862</created>
<option name="number" value="00001" />
<option name="presentableId" value="LOCAL-00001" />
<option name="project" value="LOCAL" />
<updated>1660550384862</updated>
</task>
<task id="LOCAL-00002" summary="Fixed string length problem">
<created>1664359806815</created>
<option name="number" value="00002" />
<option name="presentableId" value="LOCAL-00002" />
<option name="project" value="LOCAL" />
<updated>1664359806815</updated>
</task>
<task id="LOCAL-00003" summary="Clean up exception handling">
<created>1664360362642</created>
<option name="number" value="00003" />
<option name="presentableId" value="LOCAL-00003" />
<option name="project" value="LOCAL" />
<updated>1664360362642</updated>
</task>
<task id="LOCAL-00004" summary="Clean up exception handling">
<created>1664360792737</created>
<option name="number" value="00004" />
<option name="presentableId" value="LOCAL-00004" />
<option name="project" value="LOCAL" />
<updated>1664360792737</updated>
</task>
<task id="LOCAL-00005" summary="Fix typo">
<created>1664364310955</created>
<option name="number" value="00005" />
<option name="presentableId" value="LOCAL-00005" />
<option name="project" value="LOCAL" />
<updated>1664364310955</updated>
</task>
<task id="LOCAL-00006" summary="make socket variable final">
<created>1664364412421</created>
<option name="number" value="00006" />
<option name="presentableId" value="LOCAL-00006" />
<option name="project" value="LOCAL" />
<updated>1664364412421</updated>
</task>
<task id="LOCAL-00007" summary="code cleanup">
<created>1665125761069</created>
<option name="number" value="00007" />
<option name="presentableId" value="LOCAL-00007" />
<option name="project" value="LOCAL" />
<updated>1665125761069</updated>
</task>
<task id="LOCAL-00008" summary="trim strings correctly">
<created>1665134892670</created>
<option name="number" value="00008" />
<option name="presentableId" value="LOCAL-00008" />
<option name="project" value="LOCAL" />
<updated>1665134892670</updated>
</task>
<task id="LOCAL-00009" summary="fix class name">
<created>1665164788481</created>
<option name="number" value="00009" />
<option name="presentableId" value="LOCAL-00009" />
<option name="project" value="LOCAL" />
<updated>1665164788481</updated>
</task>
<task id="LOCAL-00010" summary="remove empty import">
<created>1665164830938</created>
<option name="number" value="00010" />
<option name="presentableId" value="LOCAL-00010" />
<option name="project" value="LOCAL" />
<updated>1665164830938</updated>
</task>
<task id="LOCAL-00011" summary="add IDEA / Maven files">
<created>1665164999878</created>
<option name="number" value="00011" />
<option name="presentableId" value="LOCAL-00011" />
<option name="project" value="LOCAL" />
<updated>1665164999878</updated>
</task>
<task id="LOCAL-00012" summary="TCP show case for class">
<created>1682066038528</created>
<option name="number" value="00012" />
<option name="presentableId" value="LOCAL-00012" />
<option name="project" value="LOCAL" />
<updated>1682066038528</updated>
</task>
<task id="LOCAL-00013" summary="Simple test examples">
<created>1682066118401</created>
<option name="number" value="00013" />
<option name="presentableId" value="LOCAL-00013" />
<option name="project" value="LOCAL" />
<updated>1682066118401</updated>
</task>
<option name="localTasksCounter" value="14" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="3" />
</component>
<component name="Vcs.Log.Tabs.Properties">
<option name="RECENT_FILTERS">
<map>
<entry key="Branch">
<value>
<list>
<RecentGroup>
<option name="FILTER_VALUES">
<option value="master" />
</option>
</RecentGroup>
<RecentGroup>
<option name="FILTER_VALUES">
<option value="true_stack" />
</option>
</RecentGroup>
</list>
</value>
</entry>
</map>
</option>
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State>
<option name="FILTERS">
<map>
<entry key="branch">
<value>
<list>
<option value="master" />
</list>
</value>
</entry>
</map>
</option>
</State>
</value>
</entry>
</map>
</option>
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="New project structure" />
<MESSAGE value="Fixed string length problem" />
<MESSAGE value="Clean up exception handling" />
<MESSAGE value="Fix typo" />
<MESSAGE value="make socket variable final" />
<MESSAGE value="code cleanup" />
<MESSAGE value="trim strings correctly" />
<MESSAGE value="fix class name" />
<MESSAGE value="remove empty import" />
<MESSAGE value="add IDEA / Maven files" />
<MESSAGE value="TCP show case for class" />
<MESSAGE value="Simple test examples" />
<option name="LAST_COMMIT_MESSAGE" value="Simple test examples" />
</component>
</project>
\ No newline at end of file
pom.xml 0 → 100644
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.hsrt</groupId>
<artifactId>Internetworking</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>18</maven.compiler.source>
<maven.compiler.target>18</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>4.6.1</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
<version>4.6.1</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.9.0</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.9.0</version>
</dependency>
</dependencies>
</project>
File added
File added
File added
package apps;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.InetAddress;
import core.Msg;
import phy.PhyProtocol;
import slp.SLPConfiguration;
import slp.SLPProtocol;
import exceptions.*;
public class SLPStudentClient implements Runnable {
private static final String SWITCHNAME = "localhost";
SLPProtocol ethP;
public SLPStudentClient(SLPProtocol eth) {
this.ethP = eth;
}
public static void main(String[] args) {
if (args.length != 1) {
System.out.println("Provide an address identifier (int) from range [5000:65534]");
return;
}
int phyPortNumber = Integer.parseInt(args[0]);
if(phyPortNumber < 5000 || phyPortNumber > 65534) {
System.out.println("Invalid address identifier! Range [5000:65534]");
return;
}
// Set up the virtual link protocol
PhyProtocol phy = new PhyProtocol(phyPortNumber);
// Create socket
SLPProtocol slp;
// Start Protocol and register client
try {
slp = new SLPProtocol(phyPortNumber, false, phy);
slp.register(InetAddress.getByName(SWITCHNAME), SLPSwitch.SWITCHPORT);
} catch (IWProtocolException | IOException e) {
e.printStackTrace();
return;
}
// Start the receiver side of the app
SLPStudentClient recv = new SLPStudentClient(slp);
Thread recvT = new Thread(recv);
recvT.start();
// Read data from user to send to client
BufferedReader inFromUser = new BufferedReader(new InputStreamReader(System.in));
boolean eof = false;
System.out.println("Input format: <dst> <message>");
while (!eof) {
try {
System.out.println("Message Destination: ");
String sentence = null;
sentence = inFromUser.readLine();
int dst = Integer.parseInt(sentence.trim());
System.out.println("Message: ");
sentence = null;
sentence = inFromUser.readLine();
SLPConfiguration config = new SLPConfiguration(dst, phy);
slp.send(sentence.trim(), config);
} catch (IOException e) {
e.printStackTrace();
} catch (IWProtocolException e) {
e.printStackTrace();
}
}
}
// Receiver thread
@Override
public void run() {
boolean eof = false;
while (!eof) {
try {
Msg msg = this.ethP.receive();
String sentence = msg.getData().trim();
System.out.println("Received message: " + sentence);
} catch (IOException e) {
e.printStackTrace();
} catch (IWProtocolException e) {
e.printStackTrace();
}
}
}
}
package apps;
import java.io.IOException;
import phy.PhyProtocol;
import slp.*;
import exceptions.*;
public class SLPSwitch {
protected static final int SWITCHPORT = 3027;
public static void main(String[] args) throws IWProtocolException {
/* Task 3.1
Setup protocol stack and call storeAndForward() method of SLPProtocol */
}
}
package core;
/*
* Abstract configuration class
* nextLowerProtocol attribute is currently unused (ignore)
*/
public class Configuration {
protected Protocol nextLowerProtocol;
public Configuration(Protocol proto) {
this.nextLowerProtocol = proto;
}
public Protocol getNextLowerProtocol() {
return nextLowerProtocol;
}
private void setNextLowerProtocol(Protocol nextLowerProtocol) {
this.nextLowerProtocol = nextLowerProtocol;
}
}
package core;
import exceptions.IWProtocolException;
/*
* Msg base class (abstract)
*/
public abstract class Msg {
protected String data;
protected byte[] dataBytes;
protected Configuration config;
public byte[] getDataBytes() {
return this.dataBytes;
}
public int getLength() {
return this.dataBytes.length;
}
public String getData() {
return this.data;
}
public void setData(String data) {
this.data = data;
}
public Configuration getConfiguration() {
return this.config;
}
protected abstract void create(String sentence);
protected abstract Msg parse(String sentence) throws IWProtocolException;
public void printDataBytes() {
String msgString = new String(this.dataBytes);
System.out.println(msgString);
}
}
package core;
import java.io.IOException;
import exceptions.IWProtocolException;
/*
* Protocol base class (abstract)
*/
public abstract class Protocol {
public abstract void send(String s, Configuration config) throws IOException, IWProtocolException;
public abstract Msg receive() throws IOException, IWProtocolException;
}
package exceptions;
public class BadChecksumException extends IWProtocolException {
/**
*
*/
private static final long serialVersionUID = -6481772554012497583L;
}
package exceptions;
public abstract class IWProtocolException extends Exception {
/**
*
*/
private static final long serialVersionUID = -7002466204521265834L;
}
package exceptions;
import exceptions.IWProtocolException;
public class IllegalAddrException extends IWProtocolException {
/**
*
*/
private static final long serialVersionUID = -2112808760774454967L;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment