Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added maxPacketParts method to the Network Card #2298

Closed
wants to merge 4 commits into from
Closed

Added maxPacketParts method to the Network Card #2298

wants to merge 4 commits into from

Conversation

brisingraerowing
Copy link

Ref #2294

@fnuecke
Copy link
Member

fnuecke commented Mar 7, 2017

I'd prefer this to go into the device info (hence the "todo remove" comment on the other, similar method). As for the attribute name, I suppose "width" could do? But feel free to use something more specific.

@skyem123
Copy link
Contributor

It's worth noting that I feel like it should be on the network card component because it's like the MTU of real networks?

@fnuecke
Copy link
Member

fnuecke commented Mar 13, 2017

Not sure what your point is? The device info is still part of the network card component.

@skyem123
Copy link
Contributor

I'm sorry... I don't really know what you're talking about with regards to "device info", as there doesn't seem to be anything on http://ocdoc.cil.li?

@Vexatos
Copy link
Contributor

Vexatos commented Mar 13, 2017

This is the device info.

@brisingraerowing
Copy link
Author

brisingraerowing commented Mar 13, 2017

@fnuecke

So how would that work? Would I add a new device attribute and set it to the value, similar to what is there?

What should that attribute be called?

@Vexatos
Copy link
Contributor

Vexatos commented Mar 13, 2017

Yes, exactly.

@@ -48,7 +48,8 @@ class NetworkCard(val host: EnvironmentHost) extends prefab.ManagedEnvironment w
DeviceAttribute.Description -> "Ethernet controller",
DeviceAttribute.Vendor -> Constants.DeviceInfo.DefaultVendor,
DeviceAttribute.Product -> "42i520 (MPN-01)",
DeviceAttribute.Capacity -> Settings.get.maxNetworkPacketSize.toString
DeviceAttribute.Capacity -> Settings.get.maxNetworkPacketSize.toString,
DeviceAttribute.MaxParts -> Settings.get.maxNetworkPacketParts.toString
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the indentation here.

@@ -69,7 +69,8 @@
public static final String Size = "size"; // actual size of the device, e.g. actual usable space on a disk
public static final String Clock = "clock"; // bus clock (in Hz) of the device, e.g. call speed(s) of a component
public static final String Width = "width"; // address width of the device, in the broadest sense

public static final String MaxParts = "maxparts"; // Maximum number of parts for, e.g. a network packet.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the indentation here. I don't like the attribute name, but I can't think of anything other than @fnuecke's "width" either.

@@ -69,7 +69,8 @@
public static final String Size = "size"; // actual size of the device, e.g. actual usable space on a disk
public static final String Clock = "clock"; // bus clock (in Hz) of the device, e.g. call speed(s) of a component
public static final String Width = "width"; // address width of the device, in the broadest sense

public static final String MaxParts = "maxparts"; // Maximum number of parts for, e.g. a network packet.

Copy link
Contributor

@Vexatos Vexatos Mar 13, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another formatting error. Remove the spaces.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already done. Notepad++ Is rather stupid when it comes to Tabs vs Spaces.

)
DeviceAttribute.Capacity -> Settings.get.maxNetworkPacketSize.toString,
DeviceAttribute.MaxParts -> Settings.get.maxNetworkPacketParts.toString
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still not formatted properly.

@@ -69,7 +69,7 @@
public static final String Size = "size"; // actual size of the device, e.g. actual usable space on a disk
public static final String Clock = "clock"; // bus clock (in Hz) of the device, e.g. call speed(s) of a component
public static final String Width = "width"; // address width of the device, in the broadest sense

public static final String MaxParts = "maxparts"; // Maximum number of parts for, e.g. a network packet.
private DeviceAttribute() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And an empty line here, please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants